CADETProcess.dataStructure.parameter.Polynomial#
- class CADETProcess.dataStructure.parameter.Polynomial(*args, **kwargs)[source]#
Represent a single polynomial using coefficients.
This class serves as a simplified version of NdPolynomial, specifically tailored for single polynomials. It is always defined by its coefficients, removing the need for an ‘n_entries’ parameter.
Use this class when only a single polynomial representation is required.
- Attributes:
- sizetuple
Size of the coefficients for the polynomial. Derived from NdPolynomial but omits ‘n_entries’.
Methods
cast_value
(value)Cast lists or scalars (int or float) to numpy arrays.
check_size
(instance, value)Validate that the provided value's size matches the expected size.
fill_values
(dims, value)Fill values to generate the polynomial matrix of the desired size.
get_default_value
(instance)Return default values if necessary.
get_expected_size
(instance)Calculate the expected size of a numpy array based on the instance's other attributes.
get_size
(value)Determines the size of the provided value.
ty
alias of
ndarray