[SciPy-Dev] scipy stats tutorial

josef.pktd at gmail.com josef.pktd at gmail.com
Sat May 12 17:10:58 EDT 2012


On Sat, May 12, 2012 at 3:54 PM, nicky van foreest <vanforeest at gmail.com> wrote:
>> Could you remove the use of the extradoc parameter? It's not needed anymore,
>> and we'll probably get rid of it at some point. Looking at the docstring can
>> be done with help() in the Python interpreter or "?" in IPython.
>
> Look here:
>
> nicky at chuck:~$ python
> Python 2.7.3 (default, Apr 20 2012, 22:39:59)
> [GCC 4.6.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from scipy.stats import norm
> Help on norm_gen in module scipy.stats.distributions object:
>
> class norm_gen(rv_continuous)
>  |  Method resolution order:
>
> etc.
>
> I did not research the cause of this, but I don't get the doc of norm,
> but of norm_gen. When I use ipython I get the correct results though.


I don't think we ever managed to get this to work. The original thread
from 2009 is not clear on whether we did.

I'm not sure there are many users left that use help(stats.xxx) for
xxx is a distribution.
print stats.norm.__doc__
works and is shorter (without methods)

> What would be the best way to call the documentation of extra_doc from
> within python?

you mean like this ?

>>> print stats.poisson.extradoc


Poisson distribution

poisson.pmf(k, mu) = exp(-mu) * mu**k / k!
for k >= 0

Josef


> NIcky
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev



More information about the SciPy-Dev mailing list