BUG: fix compatibility with numpy 1.25 (future)#333
BUG: fix compatibility with numpy 1.25 (future)#333neutrinoceros merged 1 commit intoyt-project:mainfrom
Conversation
|
@ngoldbaum I'll try to have a look at fixing the problem in unyt, as is being suggested in numpy/numpy#22744, but this PR can be merged as is so we can capture the regression on unyt's CI rather than yt's |
|
I'm looking at fixing the bug right now actually. My plan was to push to this PR and merge it with the fix. |
|
fine by me ! it's actually getting pretty late in my time zone so, by all means ! |
|
Also, given that it's known to break downstream code (yt), and we have no release date for unyt 3.0, I think it might be worth doing a bugfix release with just this fix, if it's small enough |
|
Right now we don't have any kind of maintenance branch in the repo. We also haven't done a release since we switched to pyproject.toml, so we need to be careful to make sure the sdist and wheel we upload have all the necessary metadata. If I give you upload rights on pypi would you be willing to handle the necessary git and python distribution stuff and release unyt 2.9.3? If so give me your pypi username so I can add you. Please also feel free to include any other backports you'd like to include, and don't forget to update the changelog. |
|
I'm game to do this ! |
3d2f70a to
8c343b2
Compare
|
Final note from me today but this is not going the way I had in mind; my understanding was that comparing a unyt quantity to a string should be possible (the result would always be 0). That's still how numpy 0D arrays behave and that's the expectation from yt's standpoint. If we're going to embrace it as invalid then it means yt needs a fix too. |
60aa7ef to
6970159
Compare
|
What I ended up settling on is to follow numpy's future behavior and return an array filled with bools if comparison fails. |
|
Awesome, thank you very much ! |
neutrinoceros
left a comment
There was a problem hiding this comment.
I have a couple suggestions, but overall this is great.
b2f1c71 to
3231f73
Compare
3231f73 to
f409dcc
Compare
Co-authored-by: Nathan Goldbaum Nathan Goldbaum <nathan12343@gmail.com>
f409dcc to
d37d15f
Compare
BUG: fix compatibility with numpy 1.25 (future)
BUG: fix compatibility with numpy 1.25 (future)
upstream test case from yt, see yt-project/yt#4241
For further context, see numpy/numpy#22744