Open alisterburt opened 5 months ago
We can leave it as it is with a "#TODO: Investigate how to make it faster". I am sure negative striding is a feature that people demand for pytorch, so eventually, it will be there.
For sure, it seems like they might have done some things that make it fundamentally quite difficult though - the issues go back a long way (e.g. pytorch/pytorch#604)
https://github.com/teamtomo/libtilt/blob/958e58096746a00e437f8714eca11815af4a669e/src/libtilt/grids/central_slice_grid.py#L45-L46
@rsanchezgarc pointed out this is really slow as it copies the tensor... negative strides aren't supported so not sure of the best way to deal with this right now, flipping the matrices may be cheaper at the expense of simplicity of implementation...