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

Replace np.bool by np.bool_ #2297

Merged
merged 2 commits into from Nov 24, 2022
Merged

Replace np.bool by np.bool_ #2297

merged 2 commits into from Nov 24, 2022

Conversation

gerritholl
Copy link
Collaborator

np.bool no longer exists in latest numpy, replace with np.bool_.

  • Tests added
  • Fully documented

np.bool no longer exists in latest numpy, replace with np.bool_.
@mraspaud
Copy link
Member

IIRC, np.bool was an alias for bool, so what is the motivation for switching to np.bool_?

@gerritholl
Copy link
Collaborator Author

IIRC, np.bool was an alias for bool, so what is the motivation for switching to np.bool_?

Considering the context, np.bool_ is probably what was intended. All other types are numpy types.

@gerritholl
Copy link
Collaborator Author

They actually have the same effect:

In [136]: dtype([("C", bool), ("D", np.bool_)])
Out[136]: dtype([('C', '?'), ('D', '?')])

So, why switch? For consistency with the rest of the record array definition.

@codecov
Copy link

codecov bot commented Nov 24, 2022

Codecov Report

Merging #2297 (d2e0bf3) into main (9e62ce7) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2297   +/-   ##
=======================================
  Coverage   94.35%   94.35%           
=======================================
  Files         310      310           
  Lines       46468    46468           
=======================================
  Hits        43843    43843           
  Misses       2625     2625           
Flag Coverage Δ
behaviourtests 4.60% <0.00%> (ø)
unittests 94.99% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
satpy/readers/seviri_base.py 100.00% <ø> (ø)
satpy/tests/test_dataset.py 100.00% <ø> (ø)
satpy/readers/aapp_mhs_amsub_l1c.py 95.89% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Replace np.float by np.float_ and np.str by np.str_, as that is very
likely what was intended.
@gerritholl
Copy link
Collaborator Author

@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.943% when pulling d2e0bf3 on gerritholl:np-bool into 9e62ce7 on pytroll:main.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mraspaud mraspaud merged commit 6dfb9b9 into pytroll:main Nov 24, 2022
@mraspaud mraspaud added the bug label Nov 24, 2022
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.

None yet

3 participants