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

DM-38973: Call to np.percentile in overscan.py leads to numpy warnings with 1.23 #259

Merged
merged 1 commit into from May 2, 2023

Conversation

czwa
Copy link
Contributor

@czwa czwa commented May 1, 2023

Pass only data to np.percentile from overscan maskedArray.

@czwa czwa requested a review from erykoff May 1, 2023 22:51
@@ -617,7 +617,8 @@ def maskOutliers(self, imageArray):
maskedArray : `numpy.ma.masked_array`
Masked image marking outliers.
"""
lq, median, uq = np.percentile(imageArray, [25.0, 50.0, 75.0], axis=1)
lq, median, uq = np.percentile(np.ma.getdata(imageArray),
[25.0, 50.0, 75.0], axis=1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was worried that this wouldn't work if it wasn't a masked array, but it does, so great!

@czwa czwa merged commit 03e1b4e into main May 2, 2023
1 check passed
@czwa czwa deleted the tickets/DM-38973 branch May 2, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants