def trim_zeros(self):
        """Remove the leading and trailing zeros.
        """      
        tmp = self.numpy()
        f = len(self)-len(_numpy.trim_zeros(tmp, trim='f'))
        b = len(self)-len(_numpy.trim_zeros(tmp, trim='b'))
        return self[f:len(self)-b]
def trim_zeros ( self ) : tmp = self . numpy ( ) f = len ( self ) - len ( _numpy . trim_zeros ( tmp , trim = 'f' ) ) b = len ( self ) - len ( _numpy . trim_zeros ( tmp , trim = 'b' ) ) return self [ f : len ( self ) - b ]
Remove the leading and trailing zeros.