empty

empty(shape: int | Tuple[int, ...], *, dtype: dtype | None = None, device: device | None = None) array

Returns an uninitialized array having a specified shape.

Parameters:
  • shape (Union[int, Tuple[int, ...]]) – output array shape.

  • dtype (Optional[dtype]) – output array data type. If dtype is None, the output array data type must be the default floating-point data type. Default: None.

  • device (Optional[device]) – device on which to place the created array. Default: None.

Returns:

out (array) – an array containing uninitialized data.