Skip to content

Conversation

Enderdead
Copy link
Contributor

This merge request introduces the atleast_nd delegate function (#100).

Unlike other delegate functions, atleast_nd does not exist for all major backends. Instead, the functions atleast_1d, atleast_2d, and atleast_3d are available.

In this implementation, I use getattr to delegate when ndim is between 1 and 3. I’ve also added tests with ndim=3 to cover the full range.

Open to feedback!

@lucascolley lucascolley self-requested a review October 2, 2025 16:16
@lucascolley lucascolley changed the title ENH: atleast_nd delegation ENH: atleast_nd delegation Oct 2, 2025
@lucascolley lucascolley added this to the 0.9.1 milestone Oct 2, 2025
@lucascolley lucascolley added enhancement New feature or request delegation labels Oct 2, 2025
Copy link
Member

@lucascolley lucascolley left a 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 lucascolley merged commit 708bce7 into data-apis:main Oct 3, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants