cupy.asarray — CuPy 13.4.1 documentation (original) (raw)

cupy.asarray(a, dtype=None, order=None, *, blocking=False)[source]#

Converts an object to array.

This is equivalent to array(a, dtype, copy=False, order=order).

Parameters:

Returns:

An array on the current device. If a is already on the device, no copy is performed.

Return type:

cupy.ndarray

Note

If a is an numpy.ndarray instance that contains big-endian data, this function automatically swaps its byte order to little-endian, which is the NVIDIA and AMD GPU architecture’s native use.