[Numpy-discussion] Newbie Installation problems

Paul F. Dubois paul at pfdubois.com
Tue Aug 28 14:41:07 CDT 2001


Install Python first. From the Numerical Python download site, get the
.exe file (not the zip) and run it. It is a conventional Setup-like
program. Get .exe files for the optional packages if desired and run
time too.

Functions mean and std are available in module MLab.py (note the capital
L).

Python 2.2a2 (#22, Aug 22 2001, 01:24:03) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.8 -- press F1 for help
>>> import MLab
>>> d = [1,2,4,9,12,24]
>>> MLab.mean(d)
8.6666666666666661
>>> MLab.std(d)
8.6178110136313997
>>>
-----Original Message-----
From: numpy-discussion-admin at lists.sourceforge.net
[mailto:numpy-discussion-admin at lists.sourceforge.net] On Behalf Of
Charles G Waldman
Sent: Tuesday, August 28, 2001 9:40 AM
To: Culhane, Aedin
Cc: numpy-discussion at lists.sourceforge.net
Subject: [Numpy-discussion] Newbie Installation problems

Culhane, Aedin writes:
 > Dear Numpy Discussion List Users,
 > I would really appreciate if someone could help me install numerical
python
 > on Win98. I have downloaded Numerical Python twice now (older version
and
 > 20.1.0) but I am unable to get python to import numeric. I am running
 > python2.1.

I'm sure a lot of folks on the list would be glad to help, but without
a little more detail it's hard to say much.  What errors are you
seeing?  How did you install Python?  What directory is it installed
into?  How did you try to install Numpy?

 > I need it to be able to calculate basis statistics (mean, std dev,
etc).
 > Will numerical python do this easily or should I write my own
scripts?
 > Thanks a million for your help,
 > Aedin Culhane

I think there are some statistics modules floating around on the Net,
but mean and standard deviation are one-liners in NumPy:


from Numeric import *

def mean(a): 
    return float(sum(a))/len(a)

def std_dev(a): 
    return sqrt(mean((a-mean(a))**2))



_______________________________________________
Numpy-discussion mailing list
Numpy-discussion at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/numpy-discussion





More information about the Numpy-discussion mailing list