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]])