title: Creating inverse and diagonal of numpy matrices
body: <p>I am trying to do inverse of numpy array,</p>
  
  <pre><code>from numpy import mat
  from numpy import *
  from numpy import matrix
  from numpy import linalg
  d =array ([  (0, 1,  2,  3,  4),
               ( 5,  6,  7,  8,  9),
               (10, 11, 12, 13, 14)])
  
  print d.T
  print d.I
  print d.diagonal
  #above line gives &lt;built-in method diagonal of numpy.ndarray object at 0x7fdf40a263f0&gt;
  print numpy.linalg.inv(d)
  </code></pre>
  
  <p>I am getting </p>
  
  <pre><code>AttributeError: 'numpy.ndarray' object has no attribute 'I'
  </code></pre>
  
  <p>any suggestion for this to get inverse and diagonal?</p>