[Numpy-discussion] Default value in documentation
Stefan van der Walt
stefan at sun.ac.za
Tue Oct 2 15:05:38 EDT 2007
On Tue, Oct 02, 2007 at 12:25:58PM -0600, Charles R Harris wrote:
> So label it optional and describe the default in prose in the parameter
> description if necessary. While this is less descriptive for meaningful
> defaults
> (axis=-1), the case you show above is precisely suited to it. None is not
> really
> the default value, it's really just being used as a marker for "argument
> not
> provided". And for the meaningful defaults, the function signature is more
> than
> adequate to provide the necessary information.
>
>
> I've been putting the default value first among the options. Thus
>
> axis : {-1, integer}, optional
Since the default is already listed in the function signature, I would
rather not duplicate it in the documentation.
Stéfan
More information about the NumPy-Discussion
mailing list