[SciPy-dev] Docstring convention
Stéfan van der Walt
Mon Jun 2 18:10:06 CDT 2008
2008/6/2 Keith Goodman <firstname.lastname@example.org>:
> What's preferred for documentation? I've seen all of these:
> 1d or 1D or 1-d
I think the correct form is "1-D" with a capital D. I'd prefer not to
use the "3d" form, since that could also refer to "third".
> array or ndarray, as in out : array
`ndarray` is the numpy array type, `array` is the python array type.
We'll be using `ndarray` mostly.
> int or integer, as in out : int (class name is int)
`int` for the type name.
> bool or boolean (class name is bool)
The class name.
> shape : tuple or...
> shape : tuple of integers
tuple or, if it is restricted, tuple of ints.
The type descriptions aren't parsed, so we don't need to be overly
strict. The important thing is that the reader must be able to figure
out what we mean.
More information about the Scipy-dev