Newbie Installation problems
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 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
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))
Charles G Waldman wrote:
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))
or, for the unbiased estimate: def std_dev(a): return sqrt(sum((a-mean(a))**2)/(len(a)-1)) You can also find these in Mlab.py -Chris -- Christopher Barker, Ph.D. ChrisHBarker@home.net --- --- --- http://members.home.net/barkerlohmann ---@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Oil Spill Modeling ------ @ ------ @ ------ @ Water Resources Engineering ------- --------- -------- Coastal and Fluvial Hydrodynamics -------------------------------------- ------------------------------------------------------------------------
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@lists.sourceforge.net [mailto:numpy-discussion-admin@lists.sourceforge.net] On Behalf Of Charles G Waldman Sent: Tuesday, August 28, 2001 9:40 AM To: Culhane, Aedin Cc: numpy-discussion@lists.sourceforge.net Subject: [Numpy-discussion] Newbie Installation problems
Dear Numpy Discussion List Users, I would really appreciate if someone could help me install numerical
Culhane, Aedin writes: 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 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
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? 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@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/numpy-discussion
participants (4)
-
Charles G Waldman
-
Chris Barker
-
Culhane, Aedin
-
Paul F. Dubois