numpoly.aspolynomial#
- numpoly.aspolynomial(poly_like: numpoly.typing.PolyLike, names: None | str | Tuple[str, ...] | ndpoly = None, dtype: DTypeLike | None = None) ndpoly[source]#
Convert the input to an polynomial array.
- Args:
- poly_like:
Input to be converted to a numpoly.ndpoly polynomial type.
- names:
Name of the indeterminant variables. If possible to infer from
poly_like, this argument will be ignored.- dtype:
Data type used for the polynomial coefficients.
- Return:
Array interpretation of poly_like. No copy is performed if the input is already an ndpoly with matching indeterminants names and dtype.
- Example:
>>> q0 = numpoly.variable() >>> numpoly.polynomial(q0) is q0 False >>> numpoly.aspolynomial(q0) is q0 True