title: Different output in my script and in console using dot product
body: <p>I've been trying to solve this for more than 2 hours.</p>
  
  <p>I have written a script where I put some debugging <code>print</code>s</p>
  
  <pre><code>...
  print(array)
  print(m)
  print(np.dot(m.ravel(),array.ravel()))
  ...
  </code></pre>
  
  <p>When I launch it I have this output:</p>
  
  <pre><code>$ ./test.py 
  [[    0     0     0     0     0     0     0]
   [    0     0     0     0     0     0     0]
   [    0     0     0     0     0     0     0]
   [    0     0     0 20303 20303 20303 20303]
   [20303 20303 20303 20303 20303 20303 20303]
   [20303 20303 20303 20303 20303 20303 20303]
   [20303 20303 20303 20303 20303 20303 20303]]
  [[False False False False False False False]
   [False False False False False False False]
   [False False False False False False False]
   [False False False False  True False False]
   [False False  True False  True False False]
   [False False False  True False False False]
   [False False False False False False False]]
  15676
  </code></pre>
  
  <p>When I try to reproduce this behaviour in a python console, I have a different result for the dot product:</p>
  
  <pre><code>$ /usr/bin/python3
  Python 3.4.2 (default, Oct  8 2014, 10:45:20) 
  [GCC 4.9.1] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import numpy as np
  &gt;&gt;&gt; array=np.array([[    0,     0,     0,     0,     0,     0,     0],
  [    0,     0,     0,     0,     0,     0,     0],
  [    0,     0,     0,     0,     0,     0,     0],
  [    0,     0,     0, 20303, 20303, 20303, 20303],
  [20303, 20303, 20303, 20303, 20303, 20303, 20303],
  [20303, 20303, 20303, 20303, 20303, 20303, 20303],
  [20303, 20303, 20303, 20303, 20303, 20303, 20303]])
  &gt;&gt;&gt; 
  &gt;&gt;&gt; m=np.array([[False, False, False, False, False, False, False],
  [False, False, False, False, False, False, False],
  [False, False, False, False, False, False, False],
  [False, False, False, False,  True, False, False],
  [False, False,  True, False,  True, False, False],
  [False, False, False,  True, False, False, False],
  [False, False, False, False, False, False, False]])
  &gt;&gt;&gt; np.dot(m.ravel(),array.ravel())
  81212
  </code></pre>
  
  <p>What can cause this ? By the way, <code>81212</code> is the result I expect here and really don't understand what's happening in my script.</p>