You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: Unexpected pad value when padding an uint64 array #11027
Wow, thank you for the quick and, assuming this is the cause, useful answer! I didn't even think of looking into pad's code. Next time I'll try that first.
Great, if you're new to making a PR, have a look at the "contributing to numpy" section of the developer's guide; here, most relevant is to include a new test case - which can of course just be the one you have at the top.
Activity
lagru commentedon May 1, 2018
Here is another case with a wrong pad value:
ENH: Replace old local_maxima with new algorithm
mhvk commentedon May 1, 2018
Thanks for reporting and investigating!
Just to dig a bit deeper, this ends up calling
_prepend_constand_append_const, which share the problem:The problem boils down to this line, where the padding is constructed using:
this creates zeros with
dtype=np.float64, which is wrong. I think the following replacement will solve this:Any interest in making a PR?
lagru commentedon May 1, 2018
Wow, thank you for the quick and, assuming this is the cause, useful answer! I didn't even think of looking into
pad's code. Next time I'll try that first.Yeah, why not. 😉
mhvk commentedon May 1, 2018
Great, if you're new to making a PR, have a look at the "contributing to numpy" section of the developer's guide; here, most relevant is to include a new test case - which can of course just be the one you have at the top.
ENH: Speed-up padding with specialized function
ENH: Replace old local_maxima with new algorithm
ENH: Speed-up padding with specialized function
ENH: Replace old local_maxima with new algorithm
ENH: Speed-up padding with specialized function
ENH: Replace old local_maxima with new algorithm
ENH: Speed-up padding with specialized function