(self, x)
return y
Returns filtered x.
Returns filtered x.
Returns filtered x .
def filter(self, x):
    """Returns filtered x."""
    xs = np.concatenate(list(self.xhist), axis=-1)
    ys = np.concatenate(list(self.yhist), axis=-1)
    y = np.multiply(x, self.b[:, 0]) + np.sum(
        np.multiply(xs, self.b[:, 1:]), axis=-1) - np.sum(
            np.multiply(ys, self.a[:, 1:]), axis=-1)
    self.xhist.appendleft(x.reshape((self.num_joints, 1)).copy())
    self.yhist.appendleft(y.reshape((self.num_joints, 1)).copy())
    return y
def filter ( self , x ) : xs = np . concatenate ( list ( self . xhist ) , axis = - 1 ) ys = np . concatenate ( list ( self . yhist ) , axis = - 1 ) y = np . multiply ( x , self . b [ : , 0 ] ) + np . sum ( np . multiply ( xs , self . b [ : , 1 : ] ) , axis = - 1 ) - np . sum ( np . multiply ( ys , self . a [ : , 1 : ] ) , axis = - 1 ) self . xhist . appendleft ( x . reshape ( ( self . num_joints , 1 ) ) . copy ( ) ) self . yhist . appendleft ( y . reshape ( ( self . num_joints , 1 ) ) . copy ( ) ) return y