Skip to content

Commit

Permalink
FIX: Replace inf values by nan
Browse files Browse the repository at this point in the history
  • Loading branch information
davemlz committed Aug 24, 2023
1 parent cb24d33 commit d626337
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sen2nbar/nbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ def nbar_stac(
# Compute NBAR
da = da * c

# Delete infinite values
inf_nan_mask = da.where(lambda x: ~np.isinf(x),other=np.nan)
da = da * inf_nan_mask

return da


Expand Down

0 comments on commit d626337

Please sign in to comment.