Skip to content

Commit 6f2b0ea

Browse files
committed
Add small offset to avoid zero values
1 parent 85b2e73 commit 6f2b0ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pysteps/noise/fftgenerators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ def _get_mask(Size, idxi, idxj, win_fun):
907907
win_size = (idxi[1] - idxi[0], idxj[1] - idxj[0])
908908
if win_fun is not None:
909909
wind = utils.tapering.compute_window_function(win_size[0], win_size[1], win_fun)
910+
wind += 1e-6 # avoid zero values
910911

911912
else:
912913
wind = np.ones(win_size)

0 commit comments

Comments
 (0)