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 numpy.asscalar() with numpy.ndarray.item() #1056

Merged
merged 1 commit into from
Jul 13, 2022
Merged

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Jul 13, 2022

asscalar() has been deprecated since numpy 1.16, with numpy.ndarray.item() recommended instead. Moreover, it was completely removed in numpy 1.23, released June 22. Note that none of our tests seem to cover the case where an NWB has any probe_ids.

@jwodder jwodder added the internal Changes only affect the internal API label Jul 13, 2022
@codecov
Copy link

codecov bot commented Jul 13, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.41%. Comparing base (50ca7b0) to head (b70707e).
Report is 1023 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1056      +/-   ##
==========================================
- Coverage   88.41%   88.41%   -0.01%     
==========================================
  Files          72       72              
  Lines        9251     9250       -1     
==========================================
- Hits         8179     8178       -1     
  Misses       1072     1072              
Flag Coverage Δ
unittests 88.41% <ø> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yarikoptic
Copy link
Member

Note that none of our tests seem to cover the case where an NWB has any probe_ids.

and due to if within list comprehension we did not even know about that through coverage. Oh well, let's just proceed for now. Thank you @jwodder ! I will mark for release so people with new numpy do not experience crashes etc.

@yarikoptic yarikoptic added the release Create a release when this pr is merged label Jul 13, 2022
@yarikoptic yarikoptic merged commit 785d143 into master Jul 13, 2022
@yarikoptic yarikoptic deleted the asscalar branch July 13, 2022 16:34
@github-actions
Copy link

🚀 PR was released in 0.45.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Changes only affect the internal API release Create a release when this pr is merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants