title: Why doesn't numpy determinant return a Fraction when given a Fraction matrix?
body: <p>I want to perform operations on rational matrices. I use the modules <code>numpy</code> and <code>fractions</code>.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import numpy as np
  from fractions import Fraction
  
  m=np.matrix([[Fraction(1, 6), Fraction(8, 7)], [Fraction(1, 2), Fraction(3, 2)]])
  print(np.linalg.det(m))
  # Gives -0.321428571429
  
  print(m[0,0]*m[1,1] - m[0,1]*m[1,0])
  # Gives -9/28
  </code></pre>
  
  <p>Since computing the determinant only require rational operations with the Gauss' method, the determinant of a rational matrix is rational.</p>
  
  <p>So my questions are: why does numpy return a float and not a Fraction? How can I get a rational determinant?</p>
  
  <p>Note that other operations on this matrix give a rational output (for instance <code>m.trace()</code>). </p>