(self, states, clip=True)
return states
Center the states to the interval [0, x].

        Parameters
        ----------
        states : np.array
        clip : bool, optinal
            If False the data is not clipped to lie within the limits.

        Returns
        -------
        offset_states : ndarray
Center the states to the interval [0, x].
Center the states to the interval [ 0 x ] .
def _center_states(self, states, clip=True):
        """Center the states to the interval [0, x].

        Parameters
        ----------
        states : np.array
        clip : bool, optinal
            If False the data is not clipped to lie within the limits.

        Returns
        -------
        offset_states : ndarray

        """
        states = np.atleast_2d(states).astype(config.np_dtype)
        states = states - self.offset[None, :]
        if clip:
            np.clip(states,
                    self.offset_limits[:, 0] + 2 * _EPS,
                    self.offset_limits[:, 1] - 2 * _EPS,
                    out=states)
        return states
def _center_states ( self , states , clip = True ) : states = np . atleast_2d ( states ) . astype ( config . np_dtype ) states = states - self . offset [ None , : ] if clip : np . clip ( states , self . offset_limits [ : , 0 ] + 2 * _EPS , self . offset_limits [ : , 1 ] - 2 * _EPS , out = states ) return states