numpoly.aspolynomial¶
- numpoly.aspolynomial(poly_like: numpoly.typing.PolyLike, names: Union[None, str, Tuple[str, ...], numpoly.baseclass.ndpoly] = None, dtype: Union[numpy.dtype, None, type, numpy.typing._dtype_like._SupportsDType, str, Tuple[Any, int], Tuple[Any, Union[SupportsIndex, Sequence[SupportsIndex]]], List[Any], numpy.typing._dtype_like._DTypeDict, Tuple[Any, Any]] = None) → numpoly.baseclass.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.
- Returns:
Array interpretation of poly_like. No copy is performed if the input is already an ndpoly with matching indeterminants names and dtype.
- Examples:
>>> q0 = numpoly.variable() >>> numpoly.polynomial(q0) is q0 False >>> numpoly.aspolynomial(q0) is q0 True