cunumeric.ones#

cunumeric.ones(shape, dtype=<class 'numpy.float64'>)#

Return a new array of given shape and type, filled with ones.

Parameters
  • shape (int or Sequence[int]) – Shape of the new array.

  • dtype (data-type, optional) – The desired data-type for the array. Default is cunumeric.float64.

Returns

out – Array of ones with the given shape and dtype.

Return type

ndarray

See also

numpy.ones

Availability

Multiple GPUs, Multiple CPUs