title: AttributeError: 'module' object has no attribute 'matmul'
body: <p>I just installed python 2.7 on a computer which never had python on it. Been trying to see past questions about this problem but none of them resolved my situation. I tried dot() instead of matmal(), that wokrs but I do not get the answer I think I'm looking for.</p>
  
  <pre><code>from numpy import linalg as la
  import numpy as np
  
  def myCov(a):
  at = a.T
  [rows,cols]=np.shape(at);
  #    print("rows=", rows, "cols=", cols)
  rv = np.ndarray(shape=(rows,rows), dtype=float, order='F')
  for i in range(rows):
      for j in range(rows):
          rv[i][j] = (np.dot(at[i]-np.mean(at[i]), at[j]-    np.mean(at[j])))/cols
  return rv
  
  def pro1(A):
      print("\n\nproblem1:\n")
      c1 = np.cov(A.T, None, True, True);
      c2 = myCov(A);
      print("c1=\n", c1)
      print("c2=\n", c2)
      print("c1=c2", abs(c1-c2) &lt; 0.00001)
  
  def pro2(A):
      print("\n\nproblem2:\n")
      B = myCov(A)
      eigvalues, eigvectors = la.eig(B)
  
      eigvectors12 = eigvectors[:, 0:2]
      eigvec1 = eigvectors12[:,0]
      eigvec2 = eigvectors12[:,1]
  
      print("eigvec1=", eigvec1)
      print("eigvec2=", eigvec2)
      projA = np.matmul(A , eigvectors12)
  
      print("reduced data=", projA)
  
      covProjA = myCov(projA)
  
      print("covariance matrix=", covProjA)
      varProjA = np.sum(covProjA)
      varProjA = np.matmul(np.matmul(eigvec1, B), eigvec1.T) +      np.matmul(np.matmul(eigvec2, B), eigvec2.T)
  
      print("variance=", varProjA)
      print("variance=eigv1+eigv2", abs(varProjA - eigvalues[0] - eigvalues[1]) &lt; 0.00001)
  
      print ("eigvals=", eigvalues)
      print ("eigvectors=", eigvectors)
  def main():
      float_formatter = lambda x: "%.4f" % x
      np.set_printoptions(formatter={'float_kind':float_formatter})
      A = np.loadtxt('magic04.txt', delimiter=',', usecols=range(10))
      print ("input matrix=",A)
      pro1(A)
      pro2(A)
  #print("start")
  main()
  </code></pre>
  
  <p>I keep getting AttributeError: 'module' object has no attribute 'matmul'.</p>