title: Numpy equivalent of if/else list comprehension
body: <p>Is there a numpy way of doing</p>
  
  <pre><code>n = [x-t if x &gt; 0 else x for x in nps]
  </code></pre>
  
  <p>similar to this</p>
  
  <pre><code>n = np.array(a)
  n[np.abs(n) &lt; t] = 0
  </code></pre>
  
  <p>something like this perhaps?</p>
  
  <pre><code>n[n &gt; 0] = n-t
  </code></pre>