pynbody.util.concatenate_indexing

pynbody.util.concatenate_indexing#

pynbody.util.concatenate_indexing(i1, i2)[source]#

Given either a numpy array or slice for both i1 and i2, return either a numpy array or slice i3 with the property that

ar[i3] == ar[i1][i2].

As a convenience, if i2 is None, i1 is returned