RFC: avoid deprecation warnings from numpy 2.5 when updating an array's dtype in place#637
Conversation
6b560c0 to
54814c2
Compare
…'s dtype in place
54814c2 to
b56de60
Compare
|
Did you try deleting the code that updates the dtype and allow integer arrays through unchanged? Maybe it just works? Although it occurs to me now that maybe this code is setting up an in-place multiply that needs a float array, since multiplying by a non-integral conversion factor will suffer truncation error if the array stays an integer array. Another possibly more disruptive option is to raise a TypeError so callers can reason about this. |
It doesn't. 15 tests break quite badly with errors like
I agree that's probably where we should be going with this, though we could probably do that over a deprecation cycle. |
close yt-project/yt#5420