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

Add support for np.newaxis to indexing syntax supported by linop.Slice #517

Merged
merged 2 commits into from
May 13, 2024

Conversation

bwohlberg
Copy link
Collaborator

Add support for np.newaxis to indexing syntax supported by linop.Slice.

@bwohlberg bwohlberg added the improvement Improvement of existing code, including addressing of omissions or inconsistencies label May 9, 2024
Copy link
Contributor

@Michael-T-McCann Michael-T-McCann left a comment

Choose a reason for hiding this comment

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

I wish indexed_shape could be simpler, but I could not find an alternative. A JIT function that creates an array, indexes it, and returns the shape is attractive, but slices are apparently unhashable (in most Python version). There might be a workaround.

@bwohlberg
Copy link
Collaborator Author

I wish indexed_shape could be simpler, but I could not find an alternative. A JIT function that creates an array, indexes it, and returns the shape is attractive, but slices are apparently unhashable (in most Python version). There might be a workaround.

Feel free to create an issue as a reminder to look into this if you think that's a realistic expectation.

@bwohlberg bwohlberg merged commit 4c90b49 into main May 13, 2024
18 checks passed
@bwohlberg bwohlberg deleted the brendt/linop branch May 13, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement of existing code, including addressing of omissions or inconsistencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants