code: def calc_state_matrix(self):
          
          system = self.system
  
          Gyx = matrix(system.dae.Gx)
          self.solver.linsolve(system.dae.Gy, Gyx)
  
          self.As = matrix(system.dae.Fx - system.dae.Fy * Gyx)
  
          # ------------------------------------------------------
          # TODO: use scipy eigs
          # self.As = sparse(self.As)
          # I = np.array(self.As.I).reshape((-1,))
          # J = np.array(self.As.J).reshape((-1,))
          # V = np.array(self.As.V).reshape((-1,))
          # self.As = csr_matrix((V, (I, J)), shape=self.As.size)
          # ------------------------------------------------------
          return self.As
docs: Return state matrix and store to ``self.As``
  
          Returns
          -------
          matrix
              state matrix