uxarray.grid.connectivity._replace_fill_values#
- uxarray.grid.connectivity._replace_fill_values(grid_var, original_fill, new_fill, new_dtype=None)#
Replaces all instances of the the current fill value (
original_fill
) in (grid_var
) with (new_fill
) and converts to the dtype defined by (new_dtype
)- Parameters:
grid_var (np.ndarray) – grid variable to be modified
original_fill (constant) – original fill value used in (
grid_var
)new_fill (constant) – new fill value to be used in (
grid_var
)new_dtype (np.dtype, optional) – new data type to convert (
grid_var
) to
- Returns:
grid_var – Input Dataset with correct fill value and dtype
- Return type: