-
Notifications
You must be signed in to change notification settings - Fork 16
ENH: atleast_nd delegation
#454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lucascolley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, I agree that this delegation strategy makes sense, thanks @Enderdead !
|
@lucascolley @Enderdead |
|
Thanks for the bisection, I'll try to investigate today |
|
Some of |
|
@Enderdead would you be interested in opening a PR to document that we add dimensions to the front of the shape, and removing the delegation to |
|
Apparently according to the docs, |
|
That's a weird decision by numpy, didn't know about that. I think the version assumed in |
|
@lucascolley No problem, I’ll take care of fixing this issue. I haven’t looked into it deeply yet, but it’s concerning that the proposed unit test didn’t catch this behavior mismatch. I’ll try to push a fix by the end of the week (check unit test + remove delegation). |
This merge request introduces the
atleast_nddelegate function (#100).Unlike other delegate functions,
atleast_nddoes not exist for all major backends. Instead, the functionsatleast_1d,atleast_2d, andatleast_3dare available.In this implementation, I use
getattrto delegate when ndim is between 1 and 3. I’ve also added tests with ndim=3 to cover the full range.Open to feedback!