lanl / scico

Scientific Computational Imaging COde
BSD 3-Clause "New" or "Revised" License
90 stars 17 forks source link

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

Closed bwohlberg closed 1 month ago

bwohlberg commented 1 month ago

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

bwohlberg commented 1 month ago

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.