-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Format MaxNLocator with numpydoc #12999
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
Conversation
lib/matplotlib/ticker.py
Outdated
*nbins* | ||
Parameters | ||
---------- | ||
nbins : int or 'auto', optional, default=10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default: 10
lib/matplotlib/ticker.py
Outdated
Maximum number of intervals; one less than max number of | ||
ticks. If the string `'auto'`, the number of bins will be | ||
automatically determined based on the length of the axis. | ||
|
||
*steps* | ||
steps: array-like of float, optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably "sequence of float" as it has to be 1D and can't be a scalar either (or "list of float", dunno what's more common in the codebase).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to just array-like
.
This is what we're recently using https://matplotlib.org/devdocs/devel/documenting_mpl.html#parameter-type-descriptions and is consistent with numpy and pandas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really worth relitigating this here but I tend to think that "array-like" implies "any dimensionality" and that "list of ..." or "sequence of ..." is nicer than "1D array-like of ...".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for reference, pandas and numpy us "array-like" in the 1D sense
https://pandas.pydata.org/pandas-docs/version/0.23.4/generated/pandas.Series.html
https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.interp.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyone can merge but preferably after fixing the minor nits above
1f9879f
to
0b5a9b2
Compare
PR Summary