title: How do you have if statements with a numpy array?
body: <p>I have the following input file 'r1'</p>
  
  <pre><code>14 14
  15 15
  </code></pre>
  
  <p>I would like to create the following output file 'r2'.</p>
  
  <pre><code>14 14 less than 15
  15 15 equal to 15
  </code></pre>
  
  <p>I am trying to do so using the following code.</p>
  
  <pre><code>import numpy as np
  
  s=open('r1')
  r=open('r2','w+')
  
  r1=np.loadtxt(s)
  atim=r1[:,[0]]
  alat=r1[:,[1]]
  
  if atim&lt;15 and alat&lt;15:
      print &gt;&gt; r,atim,alat,'less than 15'
  
  if atim==15 and alat==15:
      print &gt;&gt; r,atim,alat,'equal to 15'
  </code></pre>
  
  <p>However, when I run the program I get the following error
     if atim&lt;15 and alat&lt;15:
  ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()</p>