Skip to content
Snippets Groups Projects
Commit b108298b authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fix ValueError.


Signed-off-by: default avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 50316193
No related branches found
No related tags found
1 merge request!88Bugfix/fix deadpixel valueerror
This commit is part of merge request !88. Comments created here will be created in the context of that merge request.
......@@ -345,8 +345,10 @@ def interp_nodata_spatially_2d(data_2d: np.ndarray,
data_2d = np.array(DataFrame(data2int)
.interpolate(method=method, axis=axis)).astype(data_2d.dtype)
if fill_value:
data_2d[np.isnan(data_2d)] = fill_value
if np.isfinite(fill_value):
mask_nan = np.isnan(data_2d)
if True in mask_nan:
data_2d[mask_nan] = fill_value
else:
raise ValueError(implementation, 'Unknown implementation.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment