cupy.array

cupy.array(obj, dtype=None, copy=True, ndmin=0)[source]

Creates an array on the current device.

This function currently does not support the order and subok options.

Parameters:
  • objcupy.ndarray object or any other object that can be passed to numpy.array().
  • dtype – Data type specifier.
  • copy (bool) – If False, this function returns obj if possible. Otherwise this function always returns a new array.
  • 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:

cupy.ndarray

See also

numpy.array()