cupy.asarray¶
-
cupy.
asarray
(a, dtype=None, order=None)[source]¶ Converts an object to array.
This is equivalent to
array(a, dtype, copy=False)
. This function currently does not support theorder
option.Parameters: - a – The source object.
- dtype – Data type specifier. It is inferred from the input by default.
- order ({'C', 'F'}) – Whether to use row-major (C-style) or column-major (Fortran-style)
memory representation. Defaults to ‘C’.
order
is ignored for objects that are notcupy.ndarray
, but have the__cuda_array_interface__
attribute.
Returns: An array on the current device. If
a
is already on the device, no copy is performed.Return type: See also