title: Calculating with conditions over a mask on numpy without loop
body: <p>I have a numpy array x</p>
  <pre><code>x = np.array([[10, 20, 30], [40, 50, 60]])
  </code></pre>
  <p>and I have a mask m</p>
  <pre><code>m = np.array([[True, False, True], [False, True, False]])
  </code></pre>
  <p>I would like to calculate with conditions as follows:</p>
  <pre><code>y = 10*x[i, j] if m[i, j] == True else 2*x[i,j]
  </code></pre>
  <p>The expected output should be</p>
  <pre><code>100, 40, 300
  80, 500, 120
  </code></pre>
  <p>May I have your suggestions how to do it without looping?</p>