title: Why do casting rules differ between computers in python?
body: <p>I am running python 2.7 on my Mac, and I'm working on a group coding project with other people using Ubuntu. Every once and a while, code they write won't work on my computer due to casting rule errors:</p>
  
  <pre><code>    273     # Apply column averages to image
  --&gt; 274     img[:middle] *= (bg[0]/np.tile(topCol, (middle,1)))
      275     img[middle:] *= bg[1]/np.tile(botCol, (middle,1))
      276 
  
  TypeError: Cannot cast ufunc multiply output from dtype('float64') to dtype('int16') with casting rule 'same_kind'
  </code></pre>
  
  <p>I don't think you need the specifics, since this happens in a few different places with different number types. </p>
  
  <p>It works on all of their computers no problem. Everything I write works for them, but every so often what they write doesn't work for me. </p>
  
  <p>Is there a reason why our machines don't agree and is there a way I can change things on my end?</p>
  
  <p>Thanks!</p>