Skip to content

Commit

Permalink
BUG: fix a spurious warning when calling sigma_clipped_stats on a Mas…
Browse files Browse the repository at this point in the history
…kedColumn
  • Loading branch information
neutrinoceros committed Jan 10, 2024
1 parent 4d90fda commit 2ef42eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion astropy/stats/sigma_clipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def _sigmaclip_noaxis(self, data, masked=True, return_bounds=False, copy=True):

# remove masked values and convert to ndarray
if isinstance(filtered_data, np.ma.MaskedArray):
filtered_data = filtered_data.data[~filtered_data.mask]
filtered_data = filtered_data._data[~filtered_data.mask]

Check warning on line 432 in astropy/stats/sigma_clipping.py

View check run for this annotation

Codecov / codecov/patch

astropy/stats/sigma_clipping.py#L432

Added line #L432 was not covered by tests

# remove invalid values
good_mask = np.isfinite(filtered_data)
Expand Down
1 change: 1 addition & 0 deletions docs/changes/stats/15844.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a spurious warning when calling ``sigma_clipped_stats`` on a ``MaskedColumn``.

0 comments on commit 2ef42eb

Please sign in to comment.