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

Fix traitlet float64 warning #60

Merged
merged 1 commit into from
Nov 13, 2023
Merged

Conversation

bmorris3
Copy link
Contributor

In Frequency Analysis, we plot the periodogram like so:

line.x, line.y = getattr(per, self.xunit_selected), per.power

Since the periodogram returns Quantitys for period and power, the traitlet can't successfully validate the array input, raising:

UserWarning: Given trait value dtype "float64" does not match required type "float64". A coerced copy has been created.

This PR extracts the Quantitys' values as ndarrays to avoid the warning.

@bmorris3 bmorris3 requested a review from kecnry November 13, 2023 18:30
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
lcviz/events.py 100.00% <100.00%> (ø)
lcviz/helper.py 100.00% <ø> (+2.85%) ⬆️
lcviz/plugins/coords_info/coords_info.py 95.04% <100.00%> (ø)
lcviz/plugins/ephemeris/ephemeris.py 94.57% <100.00%> (ø)
...z/plugins/frequency_analysis/frequency_analysis.py 91.34% <100.00%> (ø)
lcviz/template_mixin.py 84.44% <100.00%> (-1.84%) ⬇️
lcviz/utils.py 92.03% <100.00%> (+0.29%) ⬆️

📢 Thoughts on this report? Let us know!

@kecnry kecnry merged commit fbdfbd4 into spacetelescope:main Nov 13, 2023
9 checks passed
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.

2 participants