pynbody.util.indexing_tricks#
Tricks for manipulating indexes and slices into arrays for internal use by pynbody.
Functions
|
Return a slice s3 with the property that ar[s1][s2] == ar[s3] |
|
Given either a numpy array or slice for both i1 and i2, return an object such that ar[i3] == ar[i1][i2]. |
|
Return an index array new_index such that |
|
Given either an array or slice, return |
|
Given two python slices s1 and s2, return a slice that picks out all members of s1 and s2. |
|
Return a slice s_prime with the property that ar[s_relative_to][s_prime] == ar[s]. |