def roots ( self ) : import numpy as np return np . roots ( list ( self . values ( ) ) [ : : - 1 ] ) . tolist ( )
python matrix of all ones
Returns a list with all roots . Needs Numpy .
def roots(self):
    """
    Returns a list with all roots. Needs Numpy.
    """
    import numpy as np
    return np.roots(list(self.values())[::-1]).tolist()