pisces.geometry.grids.base.Grid.full_like#

Grid.full_like(fill_value: Any, dtype: dtype | None = None, element_shape=()) ndarray[source]#

Create a filled array with the same shape as the grid.

Parameters:
  • fill_value (Any) – The value to fill the array with.

  • 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, filled with fill_value.

Return type:

np.ndarray