Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Describe how to include parameter sizes & shapes #423

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions doc/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ used as a value, ``optional`` is preferred. These are all equivalent::
copy : bool, default=True
copy : bool, default: True

If the shapes and sizes of the parameters are interrelated, then include
that information in parentheses immediately before the type information.
A trailing comma should be included inside the parentheses when the
parameter is 1D::

a : (M,) array_like
First input vector.
b : (N,) array_like
Second input vector.
out : (M, N) ndarray, optional
A location where the result is stored.

When a parameter can only assume one of a fixed set of values,
those values can be listed in braces, with the default appearing first::

Expand Down