dpnp.asanyarray
- dpnp.asanyarray(a, dtype=None, order='C')[source]
Convert the input to an ndarray, but pass ndarray subclasses through.
For full documentation refer to
numpy.asanyarray
.Limitations
Parameter
order
is supported only with default value"C"
.See also
dpnp.asarray
Similar function which always returns ndarrays.
dpnp.ascontiguousarray
Convert input to a contiguous array.
dpnp.asfarray
Convert input to a floating point ndarray.
dpnp.asfortranarray
Convert input to an ndarray with column-major memory order.
dpnp.asarray_chkfinite
Similar function which checks input for NaNs and Infs.
dpnp.fromiter
Create an array from an iterator.
dpnp.fromfunction
Construct an array by executing a function on grid positions.
Examples
>>> import dpnp as np >>> x = np.asanyarray([1, 2, 3]) >>> [i for i in x] [1, 2, 3]