Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix convolve_fft nan_treatment='fill' handling #8122

Merged
merged 13 commits into from
Oct 28, 2019
7 changes: 5 additions & 2 deletions astropy/convolution/tests/test_convolve_fft.py
Original file line number Diff line number Diff line change
@@ -343,10 +343,13 @@ def test_uniform_3_withnan(self, boundary, nan_treatment,
if nan_treatment == 'interpolate':
answer_key += '_interpnan'

posns = np.where(np.isfinite(z))
posns = np.isfinite(z)

answer = answer_dict[answer_key][posns]
if nan_treatment == 'fill':

# check that fill is set and that the 1'th position that was originally
# NaN is included in the check
if (nan_treatment == 'fill') and posns[1]:
# we fill the center with zero (the default fill value)
answer[1] = 0