msmbuilder.MSMLib.renumber_states

msmbuilder.MSMLib.renumber_states(assignments)[source]

Renumber states to be consecutive integers (0, 1, ... , n), performs this transformation in place.

Parameters:

assignments : ndarray

2D array of msmbuilder assignments

Returns:

mapping : ndarray, int

A mapping from the old numbering scheme to the new, such that mapping[new] = old

Notes

Useful if some states have 0 counts.

Versions