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
orderis supported only with default value"C".See also
dpnp.asarraySimilar function which always returns ndarrays.
dpnp.ascontiguousarrayConvert input to a contiguous array.
dpnp.asfarrayConvert input to a floating point ndarray.
dpnp.asfortranarrayConvert input to an ndarray with column-major memory order.
dpnp.asarray_chkfiniteSimilar function which checks input for NaNs and Infs.
dpnp.fromiterCreate an array from an iterator.
dpnp.fromfunctionConstruct 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]