title: Python Error : the truth value of an array with more than one element is ambiguous. use a.any() or a.all()
body: <p>I want to compare item in list, this is my code:</p>
  
  <pre><code>for i in range(200):
          if g[i]==1 and d[4]==1:
             TP += 1
          elif g[i]==1 and d[4]==0:
             FP += 1
          elif g[i]==0 and d[4]==1:
             FN += 1
          elif g[i]==0 and d[4]==0:
             TN += 1
  </code></pre>
  
  <p>and I got this Error : </p>
  
  <blockquote>
    <p>the truth value of an array with more than one element is ambiguous.
    use a.any() or a.all()</p>
  </blockquote>
  
  <p>I don't know how to use the syntax as recommended above, how to solve it, thanks.</p>