title: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced
body: <p>I have two 3D float arrays in numpy that represent two MR images of the same shape loaded with <code>nibabel</code>. I want to compute a mask that represents the region of the images where there is no zeros in any of the two images. I wrote the following simple code:</p>
  
  <pre><code>nii = nib.load('./T1.nii.gz')
  t1 = nii.get_data()
  nii = nib.load('./T2.nii.gz')
  t2 = nii.get_data()
  mask = t1 &gt; 0 &amp; t2 &gt; 0
  </code></pre>
  
  <p>I am getting the following error: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''</p>
  
  <p>Why? I think the <a href="https://docs.python.org/3/reference/expressions.html#operator-precedence" rel="nofollow noreferrer">precedence</a> o the operators <code>&gt;</code> and <code>&amp;</code> is correct. First <code>&gt;</code> operators are done and then the <code>&amp;</code>, so the <code>&amp;</code> operation is between two logical arrays of the same size. Where is the problem?</p>
  
  <p>Thanks</p>