[Scipy-tickets] [SciPy] #1880: folded normal in scipy.stats.distributions does not accept zero parameter

SciPy Trac scipy-tickets@scipy....
Fri Mar 29 09:29:54 CDT 2013


#1880: folded normal in scipy.stats.distributions does not accept zero parameter
--------------------+-------------------------------------------------------
 Reporter:  Sytse   |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Other   |     Version:  0.11.0     
 Keywords:          |  
--------------------+-------------------------------------------------------
 In the extradoc to the foldnorm_gen class it is written that the parameter
 c is restricted to non-negative values, but in fact the value 0 is not
 accepted:

 import scipy.stats.distributions as dist[[BR]]
 fn=dist.foldnorm(0)[[BR]]
 print(fn.pdf(1),fn.cdf(1),fn.stats())

 only prints nan's.

 You have to resort to the half-normal distribution in order to find the
 desired results for the parameter value 0.
 Wouldn't it be logical to allow the folded normal distribution also to
 accept zero or even negative values as it is the distribution of |X| where
 X has a normal distribution?

 BTW. I think the last komma in
     def _cdf(self, x, c,):
 is a typo which should be removed.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1880>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list