title: correct way of computing inner product with numba
body: <p>I am trying to compute the inner product of two large matrices. it seems <code>numpy</code> create  copy of matrices when trying to compute the dot product and it causes me some memory issues. After googling around I found <code>numba</code> package promising. However I can't make it work properly . Here is my code:</p>
  
  <pre><code>import numpy as np
  from numba import jit
  import time, contextlib
  
  
  
  @contextlib.contextmanager
  def timeit():
      t=time.time()
      yield
      print(time.time()-t,"sec")
  
  
  def dot1(a,b):
      return np.dot(a,b)
  
  @jit(nopython=True)
  def dot2(a,b):
      n = a.shape[0]
      m = b.shape[1]
      K = b.shape[0]
      c = np.zeros((n,m))
      for i in xrange(n):
          for j in xrange(m):
              for k in range(K):
                  c[i,j] += a[i,k]*b[k,j]
  
      return c
  
  
  
  def main():
      a = np.random.random((200,1000))
      b = np.random.random((1000,400))
  
      with timeit():
          c1 = dot1(a,b)
      with timeit():
          c2 = dot2(a,b)
  </code></pre>
  
  <p>with following running time:</p>
  
  <pre><code>dot1:
  (0.034691810607910156, 'sec')
  
  dot2:
  (0.9215810298919678, 'sec')
  </code></pre>
  
  <p>can anyone tells me what I am missing here?</p>