cunumeric.atleast_2d#

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

View inputs as arrays with at least two dimensions.

Parameters:

*arys (array_like) – One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved.

Returns:

res, res2, … – An array, or list of arrays, each with a.ndim >= 2. Copies are avoided where possible, and views with two or more dimensions are returned.

Return type:

ndarray

See also

numpy.atleast_2d

Availability:

Multiple GPUs, Multiple CPUs