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

Merge branch 'bugfix/fix_deadpixel_valueerror' into 'main'

Bugfix/fix deadpixel valueerror

Closes #103

See merge request !88
parents 50316193 f2101892
No related branches found
No related tags found
1 merge request!88Bugfix/fix deadpixel valueerror
Pipeline #59664 passed
......@@ -2,11 +2,12 @@
History
=======
0.19.3 (coming soon)
--------------------
0.19.3 (2023-04-03)
-------------------
* !87: Adapted conda environments to latest changes of enmapbox requirements.
enpt_enmapboxapp is now installed from conda-forge as this is now available.
* !88: Fixed #103 ("ValueError: cannot convert float NaN to integer" within dead pixel correction).
0.19.2 (2023-03-22)
......
......@@ -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