cunumeric.atleast_1d#

cunumeric.atleast_1d(*arys: ndarray) list[ndarray] | ndarray#

Convert inputs to arrays with at least one dimension. Scalar inputs are converted to 1-dimensional arrays, whilst higher-dimensional inputs are preserved.

Parameters:

*arys (array_like) – One or more input arrays.

Returns:

ret – An array, or list of arrays, each with a.ndim >= 1. Copies are made only if necessary.

Return type:

ndarray

See also

numpy.atleast_1d

Availability:

Multiple GPUs, Multiple CPUs