numpoly.atleast_1d¶
- numpoly.atleast_1d(*arys: numpoly.typing.PolyLike) → Union[numpoly.baseclass.ndpoly, List[numpoly.baseclass.ndpoly]][source]¶
Convert inputs to arrays with at least one dimension.
Scalar inputs are converted to 1-dimensional arrays, whilst higher-dimensional inputs are preserved.
- Args:
- arys:
One or more input arrays.
- Return:
An array, or list of arrays, each with
a.ndim >= 1
. Copies are made only if necessary.- Example:
>>> numpoly.atleast_1d(numpoly.variable()) polynomial([q0]) >>> numpoly.atleast_1d(1, [2, 3]) [polynomial([1]), polynomial([2, 3])]