pisces.geometry.grids.core.GenericGrid.empty_like#

GenericGrid.empty_like(dtype: dtype | None = None, element_shape=()) ndarray#

Create an uninitialized array with the same shape as the grid.

Parameters:
  • dtype (np.dtype, optional) – Desired data type. Defaults to float if not provided.

  • element_shape (tuple, optional) – Extra shape appended to grid shape (e.g., for vector/tensor fields).

Returns:

Array of shape grid.shape + element_shape, uninitialized (contents arbitrary).

Return type:

np.ndarray