cupy.empty_like

cupy.empty_like(a, dtype=None)[source]

Returns a new array with same shape and dtype of a given array.

This function currently does not support order and subok options.

Parameters:
  • a (cupy.ndarray) – Base array.
  • dtype – Data type specifier. The data type of a is used by default.
Returns:

A new array with same shape and dtype of a with elements not initialized.

Return type:

cupy.ndarray