title: Why applying a conditional expression doesn't work on numpy array
body: <p>I can't figure out why my <code>relu</code> function doesn't work but <code>squarer</code> works, how is it different?</p>
  <pre><code>import numpy as np
  
  x = np.array([1, 2, 3, 4, 5])
  
  squarer = lambda x: x ** 2
  squarer(x)
  # array([ 1,  4,  9, 16, 25])
  
  relu = lambda x : 0 if x &lt;= 0 else x
  relu(x)
  # ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  </code></pre>