title: Python 2.7 Matrix Multiplication Equivalent to the Dot Product?
body: <p>I have 2 issues nested as one:</p>
  
  <pre><code>n_rows, n_cols = np.shape(Z)
  ZT = Z.transpose()
  ZTZ = np.dot(ZT,Z) # does return a value
  ZTZ1 = np.matmul(ZT,Z) # error
  print("Close?")
  print(np.allclose(ZTZ,ZTZ1))
  print("----")
  
  
  ---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-211-f26bdaebc910&gt; in &lt;module&gt;()
   26 
   27 print
  ---&gt; 28 coV = getCovariance(df)
   29 #print(coV)
   30 print
  
  &lt;ipython-input-211-f26bdaebc910&gt; in getCovariance(df)
   13     ZT = Z.transpose()
   14     ZTZ = np.dot(ZT,Z)
  ---&gt; 15     ZTZ1 = np.matmul(ZT,Z)
   16     print("Close?")
   17     print(np.allclose(ZTZ,ZTZ1))
  
  AttributeError: 'module' object has no attribute 'matmul'
  </code></pre>
  
  <p>Okay ... so obviously matmul doesn't exist on my machine. Got it. Now how do I confirm that the dot is doing the same thing? Because I have a matrix that was once a <code>pandas.DataFrame</code> object and I converted it to a matrix through it's <code>.as_matrix()</code> method and I am getting rounding errors and need to check where things went wrong ... I also tried the standard <code>*</code> operator, but that doesn't work either on np.ndarray matrix objects.</p>
  
  <p>SIDE NOTE: if there are <em>any</em> pro tips on rounding that could be transferred from someone with experience with pandas, that is also much appreciated because I can't seem to find out how pandas has given me a different matrix than a build in function from the numpy class (I have been asked to reimplement the function).</p>