<h3 dir="auto">Proposed new feature or change:</h3>
<p dir="auto">Currently we can use <code class="notranslate">median()</code> and <code class="notranslate">nanmedian()</code> to calculate the median of an array along an axis, and we can compute other basic statistical metrics similarly. However, there are no methods to calculate the modes of an array directly.</p>
<p dir="auto">I would suggest adding the method <code class="notranslate">mode()</code>, which returns an array of modes, and <code class="notranslate">nanmode()</code>, which does the same but ignoring <code class="notranslate">NaN</code>s. They would work in the same fashion as <code class="notranslate">median()</code> and <code class="notranslate">nanmedian()</code>, and I reckon that they would be useful even to applications that are not related to statistics.</p>
<p dir="auto">I would appreciate any suggestions or constructive criticism</p>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/681" rel="nofollow">http://projects.scipy.org/numpy/ticket/681</a> on 2008-03-10 by trac user eilifmuller, assigned to unknown.</em></p>
<p dir="auto">numpy.random performance is weak compared to matlab.</p>
<p dir="auto">The AMD Core Math Library (ACML) provides fast random number generator functions for use with AMD64 architectures, and it would be nice to somehow incorporate these into numpy.random.</p>
<p dir="auto">Attached is a simple implementation of some of the basic functions of numpy.random using ACML. The performance is superior to matlab rand,randn.</p>