Repository navigation
BUG: lib: Fix handling of integer arrays by gradient. - #15212
Conversation
There was a problem hiding this comment.
is there a reason to limit this to only these dtypes? Perhaps it should be testing as many as possible (not datetime64 or object)
There was a problem hiding this comment.
I pushed an update with more thorough tests for the integer types.
|
LGTM. May be a candidate for a wider set of dtypes for both the new tests |
dd05b92 to
46b9d06
Compare
eric-wieser
left a comment
There was a problem hiding this comment.
See above, this has a behavior change on subclasses, I think
46b9d06 to
1e1fd66
Compare
1e1fd66 to
6b2134c
Compare
In numpy.gradient, convert integer array inputs to float64 to avoid unwanted modular arithmetic. Closes numpygh-15207.
6b2134c to
0fea57e
Compare
|
@WarrenWeckesser Did you intend to close this? |
|
@charris, yes, after pushing a whitespace change, some Azure Windows tests again failed to install mingw, so I closed and reopened to rerun the tests. I won't bother rerunning this time if those tests fail again. |
|
@eric-wieser, I think my updates addressed your requested changes. Let me know if there is anything else that should be changed. |
|
Thanks @WarrenWeckesser |
In numpy.gradient, convert integer array inputs to float64 to avoid
unwanted modular arithmetic.
Closes gh-15207.