Skip to content

Commit

Permalink
Merge pull request #5531 from cdeil/kernel-no-warn
Browse files Browse the repository at this point in the history
Remove warning in Kernel.normalize
  • Loading branch information
larrybradley committed Dec 2, 2016
2 parents 4f3c9e0 + a2ed022 commit 5a776fe
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
6 changes: 0 additions & 6 deletions astropy/convolution/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ def normalize(self, mode='integral'):
else:
np.divide(self._array, normalization, self._array)

if np.abs(1.0 / normalization) > MAX_NORMALIZATION:
warnings.warn('The kernel normalization factor is '
'exceptionally large,'
' > {0}.'.format(MAX_NORMALIZATION),
AstropyUserWarning)

self._kernel_sum = self._array.sum()

@property
Expand Down
10 changes: 0 additions & 10 deletions astropy/convolution/tests/test_kernel_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,16 +473,6 @@ def test_kernel_normalization_mode(self):
kernel = CustomKernel(np.ones(3))
kernel.normalize(mode='invalid')

def test_kernel_normalization_large(self, recwarn):
"""
Test that a warning is issued when the inverse normalization factor
is large.
"""
kernel = CustomKernel(np.ones(3) * 1.e-3)
kernel.normalize()
w = recwarn.pop(AstropyUserWarning)
assert issubclass(w.category, AstropyWarning)

def test_kernel1d_int_size(self):
"""
Test that an error is raised if ``Kernel1D`` ``x_size`` is not
Expand Down

0 comments on commit 5a776fe

Please sign in to comment.