Replies: 1 comment
-
Wrapping and truncation (I would call it clipping, since it's like the NumPy One problem is that these operations wouldn't preserve slices in general, meaning you might have to convert a slice into an integer index. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I guess this is more of a feature request than an idea, but I have always wished I could tell numpy to wrap or reflect indices that go out of range. My particular use case is performing random walk simulations on 3D domains FWIW. I feel like your approach here could enable this trick pretty easily, so thought I'd put it on your radar if it's not already. And while I'm at it, might as well add a truncate mode as well, so if I ask for a sub-block of a large array it will return a truncated block if my requested block was beyond the bounds.
Beta Was this translation helpful? Give feedback.
All reactions