fit()

fit()#

ScaleTransformer.fit(states)[source]#

Set the state_dimension if scaler is not an array, otherwise do nothing.

Parameters:
states(n, k) ndarray

Matrix of k n-dimensional snapshots.

Returns:
self
Raises:
ValueError

If the states do not align with the state_dimension (only when scaler is an array)