title: numpy/pylab min, max
body: <p>I have two array of numbers t,x:</p>
  
  <pre><code>import numpy
  t = numpy.arange(0,10,0.001)
  x = numpy.sin(t)
  </code></pre>
  
  <p>I want to produce other arrays of the same size which are the element-by-element maximum or minimum:</p>
  
  <pre><code>y1 = ?max(x,2)
  y2 = ?min(x,t)
  </code></pre>
  
  <p>where <code>?max</code> and <code>?min</code> stand for unknown functions. The <code>numpy.max()</code> and <code>numpy.min()</code> seem to find the max and min of an entire array, which is not what I want.</p>
  
  <p>How can I achieve this?</p>