ogs5py.tools.tools.replace
- ogs5py.tools.tools.replace(arr, inval, outval)[source]
Replace values of ‘arr’.
Replace values defined in ‘inval’ with values defined in ‘outval’.
- Parameters:
arr (ndarray) – array containing the input data
inval (ndarray) – values appearing in ‘arr’ that should be replaced
outval (ndarray) – values that should be written in ‘arr’ instead of values in ‘inval’
- Returns:
result – array of the same shape as ‘arr’ containing the new data
- Return type:
ndarray