Skip to content

Use simpler checks for invalid values#155

Merged
ojustino merged 4 commits intoastropy:mainfrom
ojustino:dump-masked-array
Dec 5, 2022
Merged

Use simpler checks for invalid values#155
ojustino merged 4 commits intoastropy:mainfrom
ojustino:dump-masked-array

Conversation

@ojustino
Copy link
Copy Markdown
Contributor

@ojustino ojustino commented Dec 5, 2022

In response to findings from #153, I've changed most uses of np.ma.mask_invalid() to ~np.isfinite() since we only sought a mask instead of an entire masked array object most times it was used. We do still want a masked array as the final result of FitTrace, so it remains in use there.

These changes should help tests pass with numpy v1.24.0rc1. Would close #153.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 5, 2022

Codecov Report

Merging #155 (3b242b7) into main (6b2ffb0) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #155   +/-   ##
=======================================
  Coverage   75.77%   75.77%           
=======================================
  Files           9        9           
  Lines         706      706           
=======================================
  Hits          535      535           
  Misses        171      171           
Impacted Files Coverage Δ
specreduce/core.py 74.35% <100.00%> (ø)
specreduce/extract.py 95.06% <100.00%> (ø)
specreduce/tracing.py 93.54% <100.00%> (ø)

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

@ojustino ojustino merged commit 951ede0 into astropy:main Dec 5, 2022
@pllim
Copy link
Copy Markdown
Member

pllim commented Dec 5, 2022

I took the liberty to fix change log directly in main via c92f545 . FYI.

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.

3 participants