iarray.empty#

iarray.empty(shape: Union[int, Tuple[int, ...]], *, device: Optional[Literal['cpu']] = None, cfg: Optional[Config] = None, **kwargs) IArray#

Return an uninitialized array.

An empty array has no data and needs to be filled via a write iterator.

Parameters
  • shape (int, tuple) – The shape of the array to be created.

  • device (Device) – The device on which to place the created array. The only supported value is “cpu”.

  • cfg (Config) – The configuration to use. If None (default), global defaults are used.

  • kwargs (dict) – A dictionary for setting some or all of the fields in the Config dataclass that should override the current configuration.

Returns

The new array.

Return type

IArray container