title: numpy dot returns invalid values for large arrays when using scipy.linalg.blas.sgemm
body: <p>I'm trying to compute A • A<sup>T</sup>:</p>
  
  
  
  <pre class="lang-py prettyprint-override"><code># These are my dummy values for testing
  A = np.ones((150000,265),dtype=np.float32, order='F')
  A_T = np.ones((265, 150000),dtype=np.float32, order='F')
  
  out = scipy.linalg.blas.sgemm(alpha=1.0, a=A, b=A_T)
  </code></pre>
  
  <p>Two minutes later:</p>
  
  <pre class="lang-py prettyprint-override"><code>In [7]: out
  Out[7]: 
  array([[ 265.,  265.,  265., ...,    0.,    0.,    0.],
         [ 265.,  265.,  265., ...,    0.,    0.,    0.],
         [ 265.,  265.,  265., ...,    0.,    0.,    0.],
         ..., 
         [ 265.,  265.,  265., ...,    0.,    0.,    0.],
         [ 265.,  265.,  265., ...,    0.,    0.,    0.],
         [ 265.,  265.,  265., ...,    0.,    0.,    0.]])
  
  In [10]: out.shape
  Out[10]: (150000, 150000)
  </code></pre>
  
  <p>Notice the zeros?  I'm lost... I've tried using 64bit floats and get the same output.
  From 35468 on, the array is zeros. </p>
  
  <pre class="lang-py prettyprint-override"><code>In [39]: out[0,35468]
  Out[39]: 0.0
  
  In [9]: scipy.__version__
  Out[9]: '0.12.1'
  </code></pre>
  
  <p><em><strong>UPDATE/EDIT:</em></strong></p>
  
  <p>I am fairly sure, that np.dot is calling the *gemm methods themselves.</p>
  
  <pre class="lang-py prettyprint-override"><code>In [1]: A = np.ones((150000,265), dtype=np.float32, order='F')
  
  In [2]: A_T = np.ones((265, 150000),dtype=np.float32, order='F')
  
  In [3]: out = A.dot(A_T)
  
  In [4]: out.shape
  Out[4]: (150000, 150000)
  
  In [5]: out
  Out[5]: 
  array([[ 265.,  265.,  265., ...,  265.,  265.,  265.],
     [ 265.,  265.,  265., ...,  265.,  265.,  265.],
     [ 265.,  265.,  265., ...,  265.,  265.,  265.],
     ..., 
     [   0.,    0.,    0., ...,    0.,    0.,    0.],
     [   0.,    0.,    0., ...,    0.,    0.,    0.],
     [   0.,    0.,    0., ...,    0.,    0.,    0.]], dtype=float32)
  </code></pre>