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

NumPy arrays compatibility #759

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

GoncaloLobo0
Copy link

Fixed an issue where the ind2 array was not updated when working with NumPy arrays.

A check is added to verify if ind1 and ind2 are NumPy arrays.
If they are, the slices being swapped are copied using .copy() .
If they are not, the swap operation proceeds as before.

@fmder
Copy link
Member

fmder commented Dec 5, 2024

This kind of testing is often much harder that it looks, does this method work if the individual is a class inheriting numpy arrays?

@GoncaloLobo0
Copy link
Author

It does not because im checking the module name of each array. Although, I have created a new version with a simpler method that seems to work fine, should I create a new pull request? (Sorry I'm new to open source)

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.

2 participants