title: sympy Exp of Square Matrix gives Index error
body: <pre><code>g, mu, m, n = symbols('g mu m n')
  
  
  mat = Matrix([[g, - I*mu*sqrt(m+1),I*mu*sqrt(n+1),0],
                [-I*mu*sqrt(m+1),g/2,0,I*mu*sqrt(n+1)],
                [I*mu*sqrt(n+1),0,g/2, -I*mu* sqrt(m+1)],
                [0,I*mu*sqrt(n+1),-I*mu*sqrt(m+1),g/2]])
  
  t = symbols('t')
  
  (-mat*t).exp()
  </code></pre>
  
  <p>The matrix is <code>4x4</code> and the elements are symbolic. It should work since it's a rather simplified matrix. 
  The above  gives  the follow error:</p>
  
  <pre><code>---------------------------------------------------------------------------
  IndexError                                Traceback (most recent call last)
  &lt;ipython-input-9-eab894638457&gt; in &lt;module&gt;
        1 start_time = timeit.default_timer()
        2 
  ----&gt; 3 (-mat*t).exp()
        4 
        5 elapsed = timeit.default_timer() - start_time
  
  ~/anaconda3/lib/python3.7/site-packages/sympy/matrices/matrices.py in exp(self)
     2830                 "Exponentiation is valid only for square matrices")
     2831         try:
  -&gt; 2832             P, J = self.jordan_form()
     2833             cells = J.get_diag_blocks()
     2834         except MatrixError:
  
  ~/anaconda3/lib/python3.7/site-packages/sympy/matrices/matrices.py in jordan_form(self, calc_transform, **kwargs)
     1612             if not calc_transform:
     1613                 return restore_floats(jordan_mat)
  -&gt; 1614             jordan_basis = [eig_mat(eig, 1).nullspace()[0] for eig in blocks]
     1615             basis_mat = mat.hstack(*jordan_basis)
     1616             return restore_floats(basis_mat, jordan_mat)
  
  ~/anaconda3/lib/python3.7/site-packages/sympy/matrices/matrices.py in &lt;listcomp&gt;(.0)
     1612             if not calc_transform:
     1613                 return restore_floats(jordan_mat)
  -&gt; 1614             jordan_basis = [eig_mat(eig, 1).nullspace()[0] for eig in blocks]
     1615             basis_mat = mat.hstack(*jordan_basis)
     1616             return restore_floats(basis_mat, jordan_mat)
  
  IndexError: list index out of range
  </code></pre>
  
  <p>Really no clue why this happens. And it goes SUPER slow while on Mathematica takes ~minutes to complete</p>