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

Use straxen.EventBasics.set_nan_defaults to set default values #1317

Merged
merged 2 commits into from Jan 14, 2024

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented Jan 14, 2024

What does the code in this PR do / what does it improve?

With the old code and numpy==1.26.3, we will see error like:

FAILED tests/plugins/test_plugins.py::PluginTest::test_event_ms_naive - ValueError: cannot convert float NaN to integer

This is due to

is not compatible anymore with the new numpy when there is int in result.

So this PR use straxen.EventBasics.set_nan_defaults to set the default value of result.

Can you briefly describe how it works?

Can you give a minimal working example (or illustrate with a figure)?

@dachengx dachengx marked this pull request as ready for review January 14, 2024 13:16
@coveralls
Copy link

coveralls commented Jan 14, 2024

Coverage Status

coverage: 92.445% (+0.05%) from 92.397%
when pulling 3c2c6fc on np_fix_new
into 16caa01 on master.

@dachengx dachengx merged commit 3afa397 into master Jan 14, 2024
6 of 9 checks passed
@WenzDaniel
Copy link
Collaborator

Thanks for the quick update.

@dachengx dachengx deleted the np_fix_new branch January 17, 2024 14:25
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

3 participants