Skip to content

Commit

Permalink
add change and tidy test
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-simpson committed Nov 16, 2024
1 parent 4447a5c commit d6079df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion astropy/stats/tests/test_sigma_clipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,4 +703,4 @@ def test_propagation_of_mask():
x = np.array([1, 1, 1, 1, 1, 1, 1, 1, 5, 5]).astype(float)
y = np.ma.masked_where(x > 1, x)

np.testing.assert_allclose(sigma_clipped_stats(y, grow=1), (1, 1, 0))
assert_allclose(sigma_clipped_stats(y, grow=1), (1, 1, 0))
2 changes: 2 additions & 0 deletions docs/changes/stats/17402.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix an issue in sigma-clipping where the use of ``np.copy()`` was causing
the input data mask to be discarded in cases where ``grow`` was set.

0 comments on commit d6079df

Please sign in to comment.