(self, **flags)
return out
Return list of triples (eigenval, multiplicity, basis).

        The flag ``simplify`` has two effects:
            1) if bool(simplify) is True, as_content_primitive()
            will be used to tidy up normalization artifacts;
            2) if nullspace needs simplification to compute the
            basis, the simplify flag will be passed on to the
            nullspace routine which will interpret it there.

        If the matrix contains any Floats, they will be changed to Rationals
        for computation purposes, but the answers will be returned after being
        evaluated with evalf. If it is desired to removed small imaginary
        portions during the evalf step, pass a value for the ``chop`` flag.
Return list of triples (eigenval, multiplicity, basis).
Return list of triples ( eigenval multiplicity basis ) .
def eigenvects(self, **flags):
        """Return list of triples (eigenval, multiplicity, basis).

        The flag ``simplify`` has two effects:
            1) if bool(simplify) is True, as_content_primitive()
            will be used to tidy up normalization artifacts;
            2) if nullspace needs simplification to compute the
            basis, the simplify flag will be passed on to the
            nullspace routine which will interpret it there.

        If the matrix contains any Floats, they will be changed to Rationals
        for computation purposes, but the answers will be returned after being
        evaluated with evalf. If it is desired to removed small imaginary
        portions during the evalf step, pass a value for the ``chop`` flag.
        """
        from sympy.matrices import eye

        simplify = flags.get('simplify', True)
        primitive = bool(flags.get('simplify', False))
        chop = flags.pop('chop', False)

        flags.pop('multiple', None)  # remove this if it's there

        # roots doesn't like Floats, so replace them with Rationals
        float = False
        if any(v.has(Float) for v in self):
            float = True
            self = self._new(self.rows, self.cols, [nsimplify(
                v, rational=True) for v in self])
            flags['rational'] = False  # to tell eigenvals not to do this

        out, vlist = [], self.eigenvals(**flags)
        vlist = list(vlist.items())
        vlist.sort(key=default_sort_key)
        flags.pop('rational', None)

        for r, k in vlist:
            tmp = self.as_mutable() - eye(self.rows)*r
            basis = tmp.nullspace()
            # whether tmp.is_symbolic() is True or False, it is possible that
            # the basis will come back as [] in which case simplification is
            # necessary.
            if not basis:
                # The nullspace routine failed, try it again with simplification
                basis = tmp.nullspace(simplify=simplify)
                if not basis:
                    raise NotImplementedError(
                        "Can't evaluate eigenvector for eigenvalue %s" % r)
            if primitive:
                # the relationship A*e = lambda*e will still hold if we change the
                # eigenvector; so if simplify is True we tidy up any normalization
                # artifacts with as_content_primtive (default) and remove any pure Integer
                # denominators.
                l = 1
                for i, b in enumerate(basis[0]):
                    c, p = signsimp(b).as_content_primitive()
                    if c is not S.One:
                        b = c*p
                        l = ilcm(l, c.q)
                    basis[0][i] = b
                if l != 1:
                    basis[0] *= l
            if float:
                out.append((r.evalf(chop=chop), k, [
                           self._new(b).evalf(chop=chop) for b in basis]))
            else:
                out.append((r, k, [self._new(b) for b in basis]))
        return out
def eigenvects ( self , * * flags ) : from sympy . matrices import eye simplify = flags . get ( 'simplify' , True ) primitive = bool ( flags . get ( 'simplify' , False ) ) chop = flags . pop ( 'chop' , False ) flags . pop ( 'multiple' , None ) # remove this if it's there # roots doesn't like Floats, so replace them with Rationals float = False if any ( v . has ( Float ) for v in self ) : float = True self = self . _new ( self . rows , self . cols , [ nsimplify ( v , rational = True ) for v in self ] ) flags [ 'rational' ] = False # to tell eigenvals not to do this out , vlist = [ ] , self . eigenvals ( * * flags ) vlist = list ( vlist . items ( ) ) vlist . sort ( key = default_sort_key ) flags . pop ( 'rational' , None ) for r , k in vlist : tmp = self . as_mutable ( ) - eye ( self . rows ) * r basis = tmp . nullspace ( ) # whether tmp.is_symbolic() is True or False, it is possible that # the basis will come back as [] in which case simplification is # necessary. if not basis : # The nullspace routine failed, try it again with simplification basis = tmp . nullspace ( simplify = simplify ) if not basis : raise NotImplementedError ( "Can't evaluate eigenvector for eigenvalue %s" % r ) if primitive : # the relationship A*e = lambda*e will still hold if we change the # eigenvector; so if simplify is True we tidy up any normalization # artifacts with as_content_primtive (default) and remove any pure Integer # denominators. l = 1 for i , b in enumerate ( basis [ 0 ] ) : c , p = signsimp ( b ) . as_content_primitive ( ) if c is not S . One : b = c * p l = ilcm ( l , c . q ) basis [ 0 ] [ i ] = b if l != 1 : basis [ 0 ] *= l if float : out . append ( ( r . evalf ( chop = chop ) , k , [ self . _new ( b ) . evalf ( chop = chop ) for b in basis ] ) ) else : out . append ( ( r , k , [ self . _new ( b ) for b in basis ] ) ) return out