BUG: Fix delegation behaviour with atleast_3d#514
Conversation
lucascolley
left a comment
There was a problem hiding this comment.
Thanks for the PR!
I wonder whether, rather than checking for exact equality in all of these tests, we should just check for expected shapes? Probably good to still keep one sanity-check test that we aren't unexpectedly modifying the values, but otherwise the tests are quite verbose.
Thoughts @Enderdead ?
|
@lucascolley You're right — it will be easier to understand and maintain. I'll propose another version ASAP. |
|
@lucascolley I’m proposing this new version with a hash method to perform a semi–sanity check. |
atleast_3d.atleast_3d
lucascolley
left a comment
There was a problem hiding this comment.
thanks @Enderdead, I like the approach!
atleast_3datleast_3d
5e8920c to
5c0889d
Compare
|
I replaced the Do you want me to add |
|
since |
|
Done ! |
|
@allcontributors please add @Enderdead for bug |
|
I've put up a pull request to add @Enderdead! 🎉 |
This PR fixes the bad behavior reported in scipy/scipy#23929 when
ndim=3.It removes delegation when
ndim> 2 and adds additional tests.These tests reproduce the issue while avoiding input arrays of size 1.
I'm not entirely happy with these new tests, but they provide a reasonable starting point for further iteration.
Feedback is welcome.