cupy.array¶
-
cupy.
array
(obj, dtype=None, copy=True, order='K', subok=False, ndmin=0)[source]¶ Creates an array on the current device.
This function currently does not support the
subok
option.Parameters: - obj –
cupy.ndarray
object or any other object that can be passed tonumpy.array()
. - dtype – Data type specifier.
- copy (bool) – If
False
, this function returnsobj
if possible. Otherwise this function always returns a new array. - order ({'C', 'F', 'A', 'K'}) – Row-major (C-style) or column-major
(Fortran-style) order.
When
order
is ‘A’, it uses ‘F’ ifa
is column-major and uses ‘C’ otherwise. And whenorder
is ‘K’, it keeps strides as closely as possible. Ifobj
isnumpy.ndarray
, the function returns ‘C’ or ‘F’ order array. - subok (bool) – If True, then sub-classes will be passed-through, otherwise the returned array will be forced to be a base-class array (default).
- ndmin (int) – Minimum number of dimensions. Ones are inserted to the head of the shape if needed.
Returns: An array on the current device.
Return type: Note
This method currently does not support
subok
argument.See also
- obj –