Skip to content

BUG: Handle invalid masked_invalid mask#151

Closed
pllim wants to merge 2 commits intoastropy:mainfrom
pllim:handle-invalid-mask
Closed

BUG: Handle invalid masked_invalid mask#151
pllim wants to merge 2 commits intoastropy:mainfrom
pllim:handle-invalid-mask

Conversation

@pllim
Copy link
Copy Markdown
Member

@pllim pllim commented Nov 30, 2022

I came across this while investigating spacetelescope/jdaviz#1877 . np.ma.masked_invalid(img).mask could return False. This is not being recognized by specutils, which will then emit a confusing message about the mask having mismatch shape ().

Possible suspects:

Also see:

@pllim pllim added the bug label Nov 30, 2022
@pllim pllim requested review from kecnry and ojustino November 30, 2022 18:53
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 30, 2022

Codecov Report

Merging #151 (4d97ebd) into main (05a174d) will decrease coverage by 0.07%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main     #151      +/-   ##
==========================================
- Coverage   75.46%   75.39%   -0.08%     
==========================================
  Files           9        9              
  Lines         693      695       +2     
==========================================
+ Hits          523      524       +1     
- Misses        170      171       +1     
Impacted Files Coverage Δ
specreduce/core.py 73.17% <50.00%> (-1.19%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tepickering
Copy link
Copy Markdown
Contributor

looks like this change needs some test coverage to made codecov happy...

@pllim
Copy link
Copy Markdown
Member Author

pllim commented Dec 2, 2022

I don't know how to write that test. Suggestion welcome!

pllim added a commit to pllim/specreduce that referenced this pull request Dec 2, 2022
@pllim
Copy link
Copy Markdown
Member Author

pllim commented Dec 2, 2022

I folded this PR to #153

@pllim pllim closed this Dec 2, 2022
@pllim pllim deleted the handle-invalid-mask branch December 2, 2022 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants