ENH: atleast_nd delegation#454
Conversation
lucascolley
left a comment
There was a problem hiding this comment.
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!