brainglobe / brainglobe-utils

Shared general purpose tools for the BrainGlobe project
MIT License
11 stars 1 forks source link

Numpy 2.0 compliance #85

Closed IgorTatarnikov closed 4 months ago

IgorTatarnikov commented 4 months ago

Before submitting a pull request (PR), please read the contributing guide.

Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)

Description

What is this PR

Why is this PR needed? Tests were failing due to changes in Numpy 2.0.

What does this PR do? Updates the code to adhere to Numpy 2.0. Updated reference to np.float_ to be np.float64 as per the migration guide. I also ran ruff check path/to/code/ --select NPY201 to make sure there were no other changes that weren't caught by our tests.

References

Please reference any existing issues/PRs that relate to this PR.

How has this PR been tested?

Tested locally.

Is this a breaking change?

No

Does this PR require an update to the documentation?

If any features have changed, or have been added. Please explain how the documentation has been updated (and link to the associated PR). See here for details.

Checklist:

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.59%. Comparing base (a64cd9a) to head (1714828). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #85 +/- ## ======================================= Coverage 91.59% 91.59% ======================================= Files 35 35 Lines 1607 1607 ======================================= Hits 1472 1472 Misses 135 135 ``` | [Flag](https://app.codecov.io/gh/brainglobe/brainglobe-utils/pull/85/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe) | Coverage Δ | | |---|---|---| | [numba](https://app.codecov.io/gh/brainglobe/brainglobe-utils/pull/85/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe) | `91.53% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.