Invert an assignments array – that is, produce a mapping from state -> traj/frame
Parameters: | assignments : np.ndarray
|
---|---|
Returns: | inverse_mapping : collections.defaultdict
|
Notes
we do not add these to the inverted assignments. Therefore, doing the following will raise a KeyError:
>>> inv_assignments = MSMLib.invert_assignments(assignments)
>>> print inv_assignments[-1]
KeyError: -1