[SciPy-User] scipy.stats example code with numargs
Fri Jan 6 11:17:57 CST 2012
On Fri, Jan 6, 2012 at 12:12 PM, Henry Harpending <firstname.lastname@example.org> wrote:
> Examples of the use of distributions in scipy documentation start with with
> something like this:
>>>> from scipy.stats import truncnorm
>>>> numargs = truncnorm.numargs
>>>> [ a, b ] = [0.9,] * numargs
>>>> rv = truncnorm(a, b)
> What does this do? Why 0.9? In this particular case it seems to make no
> sense: the standard normal truncated between 0.9 and 0.9. Or am I way off
You are correct that the numbers in this example don't make any sense
(unless a one-point distribution works).
The problem is that this part of the documentation is generically
generated for all or most distributions.
It is possible to overwrite the generic template but it hasn't been
done for most distributions.
> Thanks, Henry Harpending
> SciPy-User mailing list
More information about the SciPy-User