[Numpy-discussion] NumPy documentation
gruben at bigpond.net.au
Sat Aug 5 21:28:19 CDT 2006
All excellent suggestions Albert.
What about creating a numpy version of either the main Numeric or
I would like to see examples included in numpy of all functions.
However, I think a better way to do this would be to place all examples
in a separate module and create a function such as example() which would
then allow something like example(arange) to spit out the example code.
This would make it easier to include multiple examples for each command
and to actually execute the example code, which I think is a necessary
ability to make the examples testable. Examples could go in like
doctests with some sort of delimiting so that they can have numbers
generated and be referred to, so that you could execute, say, the 3rd
example for the arange() function. Perhaps a runexample() function
should be created for this or perhaps provide arguments for the
example() function like example(name, number, run)
The Maxima CAS package has something like this and also has an apropos()
command which lists commands with similar sounding names to the
argument. We could implement something similar but better by searching
the examples module for similar commands, but also listing "See Also"
cross references like those in the Numpy_Example_List,
Albert Strasheim wrote:
> Hello all
> With NumPy 1.0 mere weeks away, I'm hoping we can improve the documentation
> a bit before the final release. Some things we might want to think about:
> 1. Documentation Sprint
> This page:
> mentions a possible Documentation Sprint at SciPy 2006. Does anybody know if
> this is going to happen?
> 2. Tickets for missing functions missing docstrings
> Would it be helpful to create tickets for functions that currently don't
> have docstrings? If not, is there a better way we can keep track of the
> state of the documentation?
> 3. Examples in documentation
> Do we want to include examples in the docstrings? Some functions already do,
> and I think think this can be quite useful when one is exploring the
> Maybe the example list:
> should be incorporated into the docstrings? Then we can also set up doctests
> to make sure that all the examples really work.
> 4. Documentation format
> If someone wants to submit documentation to be included, say as patches
> attached to tickets, what kind of format do we want?
> There's already various PEPs dealing with this topic:
> Docstring Processing System Framework
> Docstring Conventions
> Docutils Design Specification
> reStructuredText Docstring Format
> 5. Documentation tools
> A quick search turned up docutils:
> and epydoc:
> Both of these support restructured text, so that looks like the way to go. I
> think epydoc can handle LaTeX equations and some LaTeX support has also been
> added to docutils recently. This might be useful for describing some
> Something else to consider is pydoc compatibility. NumPy currently breaks
> It also breaks epydoc 3.0a2 (maybe an epydoc bug):
> Anything else? How should we proceed to improve NumPy's documentation?
More information about the Numpy-discussion