[SciPy-dev] documenting objects in stats.distributions

Christopher Burns cburns@berkeley....
Wed Dec 16 01:58:33 CST 2009


We're working on documentation at the SciPy.in sprints and have run
into a strange documentation problem.  Several of the distributions
are objects, not classes, so the documentation page gives a warning
"Unknown section Methods".

See:
http://docs.scipy.org/scipy/docs/scipy.stats.alpha/

Is there a way to update the docs to remove this warning?

This is the actual code:

class alpha_gen(rv_continuous):
   def _pdf(self, x, a):
       return 1.0/arr(x**2)/special.ndtr(a)*norm.pdf(a-1.0/x)
   def _cdf(self, x, a):
       return special.ndtr(a-1.0/x) / special.ndtr(a)
   def _ppf(self, q, a):
       return 1.0/arr(a-special.ndtri(q*special.ndtr(a)))
   def _stats(self, a):
       return [inf]*2 + [nan]*2
alpha = alpha_gen(a=0.0,name='alpha',shapes='a',extradoc="""

Alpha distribution

alpha.pdf(x,a) = 1/(x**2*Phi(a)*sqrt(2*pi)) * exp(-1/2 * (a-1/x)**2)
where Phi(alpha) is the normal CDF, x > 0, and a > 0.
""")

Thanks!

-- 
Christopher Burns
Computational Infrastructure for Research Labs
10 Giannini Hall, UC Berkeley
510-643-4053
http://cirl.berkeley.edu/


More information about the SciPy-Dev mailing list