Skip to content
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

Xp asarray #113

Closed
wants to merge 2 commits into from
Closed

Xp asarray #113

wants to merge 2 commits into from

Conversation

mdhaber
Copy link
Owner

@mdhaber mdhaber commented Nov 14, 2024

# If object is array-like (but not array), make it an ndarray; otherwise, no-op.
array = np.asanyarray(array)

if is_numpy(xp_in) and not array.__class__.__name__.endswith('.ndarray') and subok:
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace with preferred method of determining whether object is strict subclass of ndarray.

@lucascolley
Copy link

your changes to _asarray look good to me!

@mdhaber
Copy link
Owner Author

mdhaber commented Nov 14, 2024

Thanks. I think it will be easiest to copy that into a new PR as a separate xp_array and transition what I can to that. The cluster changes will be more extensive and can happen separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants