Caution
You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.10.2.
librosa.sequence.transition_uniform
- librosa.sequence.transition_uniform(n_states)[source]
Construct a uniform transition matrix over
n_states
.- Parameters:
- n_statesint > 0
The number of states
- Returns:
- transitionnp.ndarray [shape=(n_states, n_states)]
transition[i, j] = 1./n_states
Examples
>>> librosa.sequence.transition_uniform(3) array([[0.333, 0.333, 0.333], [0.333, 0.333, 0.333], [0.333, 0.333, 0.333]])