You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to map a slice to a list/set of coordinates in the input array? For example if one wants to get the slice [R[]; R[3;10;3]; L[1; 20]] of array x, is there a way to get the corresponding coordinate list like [[a;b;c]; [d;e;f]; ...]. A function like this would be very convenient for the kind of application i'm using owl on.
Think of a chunked array split up into a 4x4 grid of owl arrays. Slicing the chunked array using fancy/basic indexing would involve getting the list of coordinates of the chunked array, then map those individual coordinates to the correct "grid" coordinate, get the values and then return them to the caller as a new n-dimensional array. Any ideas on how this can be achieved without re-inventing the wheel?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there a way to map a slice to a list/set of coordinates in the input array? For example if one wants to get the slice
[R[]; R[3;10;3]; L[1; 20]]
of arrayx
, is there a way to get the corresponding coordinate list like[[a;b;c]; [d;e;f]; ...]
. A function like this would be very convenient for the kind of application i'm using owl on.Think of a chunked array split up into a 4x4 grid of owl arrays. Slicing the chunked array using fancy/basic indexing would involve getting the list of coordinates of the chunked array, then map those individual coordinates to the correct "grid" coordinate, get the values and then return them to the caller as a new n-dimensional array. Any ideas on how this can be achieved without re-inventing the wheel?
Beta Was this translation helpful? Give feedback.
All reactions