pynbody.halo.details.iord_mapping.IordToOffsetSparse#
- class pynbody.halo.details.iord_mapping.IordToOffsetSparse(iord_array)[source]#
Bases:
IordToOffsetClass for efficiently mapping from iords to offsets in the iord array, even if iord values are large.
WARNING: if a query is made with iords that are not themselves in ascending order, a sort takes place ahead of the query and therefore the set returned is correct but the ordering is not preserved.
Methods
map_ignoring_order(iord_values)Given an array of iord values, return the corresponding fpos values.