Skip to content

Commit

Permalink
DOC: added instruction on how to use help() for distributions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ndvanforeest authored and rgommers committed May 20, 2012
1 parent c946a59 commit 25ae546
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions doc/source/tutorial/stats.rst
Expand Up @@ -43,30 +43,23 @@ Getting Help
^^^^^^^^^^^^^^^^^^^^

First of all, all distributions are accompanied with help
functions. ``help(stats.nct)`` prints the complete docstring of the
distribution. To obtain just some basic information we can call
functions. To obtain just some basic information we can call

>>> from scipy import stats
>>> from scipy.stats import norm
>>> print norm.extradoc
Normal distribution
>>> print norm.__doc__

The location (loc) keyword specifies the mean.
The scale (scale) keyword specifies the standard deviation.

normal.pdf(x) = exp(-x**2/2)/sqrt(2*pi)

We clarify the words ``loc`` and ``scale`` below. To find the support,
i.e., upper and lower bound of the distribution, call:
To find the support, i.e., upper and lower bound of the distribution,
call:

>>> print 'bounds of distribution lower: %s, upper: %s' % (norm.a,norm.b)
bounds of distribution lower: -inf, upper: inf

We can list all methods and properties of the distribution with
``dir(norm)``. As it turns out, some of the methods are private
``dir(norm)``. As it turns out, some of the methods are private
methods although they are not named as such (their name does not start
with a leading underscore), for example ``veccdf`` or ``xa`` and
``xb`` are only available for internal calculation.
``xb`` are only available for internal calculation.

To obtain the `real` main methods, we list the methods of the frozen
distribution. (We explain the meaning of a `frozen` distribution
Expand Down Expand Up @@ -94,7 +87,6 @@ introspection:
number of discrete distributions: 12



Common Methods
^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit 25ae546

Please sign in to comment.