[SciPy-User] scipy.stats.invnorm - rename to invgauss?

josef.pktd at gmail.com josef.pktd at gmail.com
Wed Apr 7 15:05:43 EDT 2010


On Wed, Apr 7, 2010 at 2:45 PM, Matthew Brett <matthew.brett at gmail.com> wrote:
> Hi,
>
> I was caught in the same trap as another innocent, in thinking that
> scipy.stats.invnorm was the inverse of the normal distribution:
>
> http://bytes.com/topic/python/answers/478142-scipy-numpy-inverse-cumulative-normal
>
> In my desire to improve the docstring, I started looking; after a
> while I found this:
>
> http://en.wikipedia.org/wiki/Inverse_Gaussian_distribution
>
> - and that seems to fit the invnorm code.
>
> A Google search for 'inverse normal distribution' does not include the
> page above in the first 20 hits, but does find the inverse of the
> normal distribution, and this:
>
> http://en.wikipedia.org/wiki/Normal-inverse_Gaussian_distribution
>
> I wonder whether it would be good to rename scipy.stats.invnorm to
> scipy.stats.invgauss ?  Maybe with a deprecation warning to invnorm?

in general I wouldn't mind, but for naming consistency I prefer the current name

distributions created by some transformation of the normal distribution:

>>> [i for i in dir(stats) if 'norm' in i and isinstance(getattr(stats,i), stats.distributions.rv_generic)]
['foldnorm', 'halfnorm', 'invnorm', 'lognorm', 'norm', 'powerlognorm',
'powernorm', 'truncnorm']

I don't think the confusion persists very long, invnorm is a
distribution, the inverse function of the cdf of the normal
distribution is a function or in our case a method (ppf).

Josef


>
> Best,
>
> Matthew
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



More information about the SciPy-User mailing list