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

Fix numpy slicing #107

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Conversation

Erotemic
Copy link
Contributor

In numpy 1.23.1 (or sooner, I didn't bisect it) using lists to slice is no longer allowed. It gives the error message:

IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

This PR fixes it by casting to a tuple being using as a slice.

@StellarStorm StellarStorm self-assigned this Dec 1, 2023
@StellarStorm StellarStorm merged commit 54bb190 into loli:master Dec 7, 2023
@StellarStorm
Copy link
Collaborator

Merged, thank you!

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