mlpy.mdp.stateaction.State.set_states_per_dim

State.set_states_per_dim(nstates)

Sets the number of states per feature.

This extracts the number of features from nstates and compares it to the attribute nfeatures. If it doesn’t match, an exception is thrown. If the nfeatures attribute is None, nfeatures is set to the extracted value.

Parameters:

nstates : array_like, shape (nfeatures,)

The number of states per features

Raises:

ValueError

If the array is not a vector of length nfeatures.