dpnp.asarray

dpnp.asarray(x1, dtype=None, order='C', like=None, device=None, usm_type=None, sycl_queue=None)[source]

Converts an input object into array.

For full documentation refer to numpy.asarray.

Limitations

Parameter like is supported only with default value None.

See also

dpnp.asanyarray

Similar function which passes through subclasses.

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.asarray([1, 2, 3])
>>> print(x)
[1 2 3]