title: How to use conditional expressions inside of a numpy sum
body: <p>I have an a 2d array where rows represent patients and the columns represent attribute (old, excercises, disease). </p>
  
  <p>My intention is to count the number of patients who excercise and have disease. I know that it is possible to 
      np.sum(patientData[1])</p>
  
  <p>but how can i do something like this
      np.sum(patientData[1] and patientData[2])</p>
  
  <p>Example of data</p>
  
  <pre><code>A = [ [34, 1, 1],
        [22, 0, 0],
        [90, 1, 1]
      ]
  </code></pre>
  
  <p>So for example, first entry means the patient is 34 years old, excercises, and has the disease</p>
  
  <p>The number of patients from this example who both excercise and have the disease is 2. </p>
  
  <p>Right now I am doing this</p>
  
  <pre><code>excerciseAndDisease = 0
  for row in A:
     if row[1] and row[2]:
        excercsieAndDisease += 1
  </code></pre>