cupynumeric.ones#

cupynumeric.ones(
shape: NdShapeLike,
dtype: npt.DTypeLike = <class 'numpy.float64'>,
) ndarray#

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

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

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

Returns:

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

Return type:

ndarray

See also

numpy.ones

Availability:

Multiple GPUs, Multiple CPUs