[Numpy-discussion] Is this a wheel?

Jon Saenz jsaenz at wm.lc.ehu.es
Mon Jan 29 08:46:44 CST 2001


Hello, there.

I needed last Saturday a function which returns the greatest/smallest
element of a NumPy array. I seeked through the documentation and found the
argmax/argmin functions. However, they must be called recursively to find
the greatest(smallest) element of a multidimendional array. As I needed to
process a BIG dataset of multidimensional arrays, I wrote a function in C
which returns as a NumPy array shaped (2,) the [smallest one,biggest one]
elements in an arbitrarily shaped NumPy array. It is pure C and works for
multidimensional arrays. The return typecode is the same of the input
array (except with complex numbers, which compare numbers through their
modules).

I can make this function available to general public by means of my WEB
page or my starship account as a module. However, I wonder:
a) Is this a wheel already invented some 40,000 years ago? May be I missed
something in the manual?
b) If the answer to the previous question is NO, would you (main
developers) be interested in making it available as one of the "general
purpose" NumPy functions? It is quite general-purpose, indeed. I have
needed it five times or so in the last two years...

Looking after your comments.


Jon Saenz.				| Tfno: +34 946012470
Depto. Fisica Aplicada II               | Fax:  +34 944648500
Facultad de Ciencias.   \\ Universidad del Pais Vasco \\
Apdo. 644   \\ 48080 - Bilbao  \\ SPAIN





More information about the Numpy-discussion mailing list