-
Notifications
You must be signed in to change notification settings - Fork 57
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.float with np.float64 to fix numpy 1.20 deprecation #250
Conversation
Hello @lgarrison! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-06-08 16:03:34 UTC |
Yes - definitely needs to happen. I will take a look tomorrow |
@lgarrison Thanks! I found one instance of And will you please add an entry to the changelog? |
Holy crap - we still haven't release |
Done! And yeah, let's release 2.4.0! Lots of good quality-of-life changes there. I'll try to merge #199 before we release; I think we still want that change. |
@lgarrison Should we add a GH-actions checking with numpy 1.20? |
Probably, yeah. Actually, I would advocate for just testing two versions of Numpy: the latest, and the earliest we want to support (so 1.14?). A smaller test matrix reduces the time for all the tests to launch and run, and more importantly, reduces the chances of one of the dozens of tests hanging, requiring manual intervention. Does that sound okay to you? If this needs more discussion, we can defer that to later and I'll just add 1.20 to the matrix for now. |
My approach has been to the "oldest", "mid-tier", and "latest" versions of numpy. So in this case, we can retire |
@lgarrison And presumably this branch is safe to delete as well |
np.float
is an alias to Python's builtinfloat
and is deprecated in Numpy 1.20. It looks like we've been usingnp.float
when we want 64-bit behavior (andnp.float32
when we want 32 bits), so I think for us the correct change is to replacenp.float
withnp.float64
, even though they may be semantically different in rare cases. Let's make sure the tests pass, for starters.@manodeep Any reservations on this change?
More on the deprecation: