[SciPy-dev] ndimage - docfiller and output_type

josef.pktd@gmai... josef.pktd@gmai...
Sun Nov 15 20:52:57 CST 2009


On Sun, Nov 15, 2009 at 11:08 AM, Ralf Gommers
<ralf.gommers@googlemail.com> wrote:
>
>
> On Fri, Oct 30, 2009 at 3:45 PM, Ralf Gommers <ralf.gommers@googlemail.com>
> wrote:
>>
>>
>> On Thu, Oct 29, 2009 at 3:33 PM, <josef.pktd@gmail.com> wrote:
>>>
>>> I have to look at this again next week when I have a bit more time.
>>>
> Did you have time to look at it again Josef? I created ticket 1055 and
> attached a patch. Please review either there or on github if you can.

Thanks, I took your version from github. Since there are many changes,
including cosmetic, I didn't go over all of them. I compared several
docstrings of the old and the new version, and overall it seems to work
very well.

The main mistake currently is that the generic docstring for discrete is
the same as the one for the continuous distributions, e.g.

print stats.poisson.__doc__

discrete distributions don't have a scale argument, and don't have a pdf
method, instead of pdf, discrete distributions have a pmf probability mass
function.

Second, the generic class docstrings are pretty empty, e.g. they don't have
the list of methods.

print stats.distributions.rv_discrete.__doc__
print stats.distributions.rv_continuous.__doc__

taste questions:
I don't think I like the formulas in the methods, e.g. print stats.wald.__doc__
I think, formulas from the extradocs should go into a notes section.

I would also prefer to keep extradoc for now, even if it is not used
anymore for the docstrings, just because I'm very used to using it. We
can drop them later once the new system is fully working.

Given that there is more flexibility with the new system, I would
prefer to put the extradoc information into a notes section instead of
tucking them on at the end in the default template, if possible.

Why did you special case before and after pdf?

Also, I think it would be better making the framework changes separate
from any changes to the content, e.g rv_continuous, rv_discrete. If
everything works, we can edit and review changes to the content in the
doc editor.

Sorry for the delay in the review, I've been busy and I have problems
keeping up with the C changes in numpy and scipy.
(I only commented on the parts I didn't like so much, because the rest
is a good improvement.)

Thanks,

Josef


> Thanks,
> Ralf
>
>
>>>
>>> I don't mind the boiler plate code in the individual distributions
>>> anymore,
>>> if we can improve the docs for the distributions this way. You could try
>>> it out on a few distributions to avoid having to edit 90 templates if
>>> there
>>> are any changes.
>>>
>>
>> Josef, the changes are here:
>> http://github.com/rgommers/scipy/tree/statsdocs For examples of new
>> docstrings, see maxwell, wald and nbinom.
>>
>>
>> Do you use git, or would you prefer it if I opened a ticket and attached a
>> diff?
>>
>> The things I was not sure about:
>> 1. do you want the old-style classes with better help()? I actually
>> consider this a bug:
>> >>> help(wald)
>> Help on wald_gen .....         # I asked for help on wald, not wald_gen
>>
>> 2. Where should doccer.py live? Now I do "from scipy.ndimage import
>> doccer", but doccer is useful in multiple SciPy modules, and probably in
>> NumPy as well. Could we move it to NumPy?
>>
>>
>
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>


More information about the Scipy-dev mailing list