title: Subtracting 3D numpy arrays in Python Vs Matlab
body: <p>I have two 3D numpy arrays and I would like to find out the difference between them.</p>
  
  <pre><code>&gt;&gt;&gt;A.dtype
  dtype('uint32')
  &gt;&gt;&gt;B.dtype
  dtype('uint32')
  &gt;&gt;&gt;A.shape
  (86, 50, 108)
  &gt;&gt;&gt;B.shape
  (86, 50, 108)    
  &gt;&gt;&gt;A.min()
  0
  &gt;&gt;&gt;B.min()
  0
  &gt;&gt;&gt;A.max()
  89478487
  &gt;&gt;&gt;B.max()
  89115767
  </code></pre>
  
  <p>Now, if we do <code>A - B</code> </p>
  
  <pre><code>&gt;&gt;&gt; diff = abs( A-B );
  &gt;&gt;&gt; diff.min()
  0
  &gt;&gt;&gt; diff.max()
  4294967292
  </code></pre>
  
  <p>Considering the <code>min</code> and <code>max</code> values of both matrices we cannot have <code>4294967292</code> as maximum value of the difference matrix. 
  I have also done similar operations in Matlab and the difference <code>diff</code>  and maximum value <code>diff.max()</code> are consistent. What is exactly <code>A-B</code> operation doing? My understanding is that  the default behaviour for add, subtract, multiply and divide arrays with each other was element-wise operations however there is something funny happening here.</p>