title: Can a numpy array be compared to an integer?
body: <p>This was in some code that I'll have to use for a homework:</p>
  
  <pre><code>from PIL import Image
  import numpy as np
  img = np.array(Image.open("image.png"))[:,:,0]
  Known = (img &gt; 0).astype(int)
  </code></pre>
  
  <p>What does the last line - <code>Known = (img &gt; 0).astype(int)</code> - do?</p>
  
  <p>(I tried looking it up, but it's hard to search for the ">" symbol in google search.</p>