[Numpy-discussion] Using normal()

Rich Shepard rshepard@appl-ecosys....
Thu Apr 24 12:01:47 CDT 2008

   Rereading "Guide to NumPy" once again, I saw what I had missed all the
previous times: the normal() distribution function (Chapter 10, page 173).
I have several questions on using it in my application.

   The syntax is normal(loc=0.0, scale=1.0, size=None), but I've not seen
what those represent, nor how to properly invoke this function. A clue will
be much appreciated.

   I want to call normal() passing at least the width of the curve(at the end
points where y=0.0), and the center (where y=1.0). Being able to specify the
y value of the inflection point (by default 0.5) would also be helpful.

   In the application's function I now have:

   from numpy import *

   x = nx.arange(0, 100, 0.1)
   y = nx.normal(center,width)  # passed to the function when called

and I then pass x,y to PyX for plotting. But python responds with:

   y = nx.normal(center,width)
AttributeError: 'module' object has no attribute 'normal'

   Pointers to what I should be doing are needed.



Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

More information about the Numpy-discussion mailing list