Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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