Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_deadpixel_valueerror' into 'main'
Browse files Browse the repository at this point in the history
Bugfix/fix deadpixel valueerror

Closes #103

See merge request EnMAP/GFZ_Tools_EnMAP_BOX/EnPT!88
  • Loading branch information
Daniel Scheffler committed Apr 3, 2023
2 parents 5031619 + f210189 commit d3b10e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down

0 comments on commit d3b10e8

Please sign in to comment.