[SciPy-user] amax, amin, mean

Lionel Roubeyrie lroubeyrie at limair.asso.fr
Tue Mar 28 05:33:19 EST 2006


Hello all,
I'm trying to use Scipy for computing large time series, but I start with a 
strange thing (last Scipy is build on a recent linux box) :

lionel[~]2>from scipy import *

lionel[~]3>import MA

lionel[~]4>test=[1,2,3,4,nan,5,6]

lionel[~]5>test=MA.masked_object(test, nan)

lionel[~]6>amax(test)
 Sortie[6]:6.0

lionel[~]7>amin(test)
 Sortie[7]:5.0

lionel[~]8>mean(test)
 Sortie[8]:nan

hum, max is good, but mean and amin not. In the doc, Scipy use numpy.amin as 
amin, but:
lionel[~]9>import numpy

lionel[~]10>numpy.amin(test)
---------------------------------------------------------------------------
exceptions.ValueError                                Traceback (most recent 
call last)
...
ValueError: object __array__ method not producing an array

I'm new in the Scipy/numpy word, does I do something wrong?
Thanks for your help.

-L. Roubeyrie





More information about the SciPy-User mailing list