title: python / mpmath - How to get the real values of a complex matrix?
body: <p>I am trying to get the real values of a complex valued matrix.</p>
  
  <pre><code>import mpmath as mp
  A = mp.matrix([[1+1j, 2+2j],[3+2j, 4+2j]])
  </code></pre>
  
  <p>I've tried both:</p>
  
  <pre><code>mp.re(A)
  np.real(A)
  </code></pre>
  
  <p>but neither work.</p>
  
  <p>I've also tried looking for information here but haven't found anything
  <a href="http://docs.sympy.org/0.6.7/modules/mpmath/basics.html" rel="nofollow">http://docs.sympy.org/0.6.7/modules/mpmath/basics.html</a></p>
  
  <p>The first gives an error message: <code>cannot create mpf from matrix ...</code></p>
  
  <p>The second gives: <code>insufficient indices for matrix</code></p>
  
  <p>any help appreciated</p>