cunumeric.empty_like#

cunumeric.empty_like(prototype, dtype=None)#

Return a new array with the same shape and type as a given array.

Parameters:
  • prototype (array_like) – The shape and data-type of prototype define these same attributes of the returned array.

  • dtype (data-type, optional) – Overrides the data type of the result.

  • shape (int or tuple[int], optional) – Overrides the shape of the result.

Returns:

out – Array of uninitialized (arbitrary) data with the same shape and type as prototype.

Return type:

ndarray

See also

numpy.empty_like

Availability:

Multiple GPUs, Multiple CPUs