title: python crashed two times while large matrix multiplication
body: <p>I have two matrices with following size m=(15715, 203) n=(203, 16384) .I am doing matrix multiplication in python, code is as shown I am using canopy software to run this code but before completion it is taking lots of memory space and crashing please can anyone help regarding this issue?</p>
  
  <pre><code>  import pandas as pd
  m = pd.read_csv("Pmatrix.csv")
  row0=m.shape[0]
  len0=len(m.columns)
  print row0
  print len0
  
  n = pd.read_csv("Qmatrix.csv")
  row1=n.shape[0]
  len1=len(n.columns)
  
  print row1
  print len1
  
  
  def matrixmult (A, B):
      row0 = m.shape[0]
  
      len0 = len(m.columns)
      row1 = n.shape[0]
      len1 = len(n.columns)
  
      if len0 != row1:
        print "Cannot multiply the two matrices. Incorrect dimensions."
        Y=A.shape
        Z=B.shape
        print Y
        print Z
  
        return
  
      # Create the result matrix
      # Dimensions would be row0 x len1
      C = [[0 for row in range(len1)] for col in range(row0)]
      print C
  
      for i in range(row0):
          for j in range(len1):
              for k in range(len0):
                  C[i][j] += A[i][k] * B[k][j]
      return C
  </code></pre>