Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 88b1abf

Browse filesBrowse files
authored
Merge pull request #15873 from timhoffm/doc-param-types
DOC: Standardize parameter types in docs
2 parents ec12375 + 3fc1185 commit 88b1abf
Copy full SHA for 88b1abf

File tree

Expand file treeCollapse file tree

6 files changed

+22
-22
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+22
-22
lines changed

‎lib/matplotlib/backends/backend_pdf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pdf.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2409,7 +2409,7 @@ def __init__(self, filename, keep_empty=True, metadata=None):
24092409
keep_empty : bool, optional
24102410
If set to False, then empty pdf files will be deleted automatically
24112411
when closed.
2412-
metadata : dictionary, optional
2412+
metadata : dict, optional
24132413
Information dictionary object (see PDF reference section 10.2.1
24142414
'Document Information Dictionary'), e.g.:
24152415
``{'Creator': 'My software', 'Author': 'Me', 'Title': 'Awesome'}``.

‎lib/matplotlib/backends/backend_pgf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pgf.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ def __init__(self, filename, *, keep_empty=True, metadata=None):
10231023
keep_empty : bool, optional
10241024
If set to False, then empty pdf files will be deleted automatically
10251025
when closed.
1026-
metadata : dictionary, optional
1026+
metadata : dict, optional
10271027
Information dictionary object (see PDF reference section 10.2.1
10281028
'Document Information Dictionary'), e.g.:
10291029
``{'Creator': 'My software', 'Author': 'Me', 'Title': 'Awesome'}``.

‎lib/matplotlib/mlab.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mlab.py
+14-14Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def apply_window(x, window, axis=0, return_window=None):
9898
Either a function to generate a window or an array with length
9999
*x*.shape[*axis*]
100100
101-
axis : integer
101+
axis : int
102102
The axis over which to do the repetition.
103103
Must be 0 or 1. The default is 0
104104
@@ -157,7 +157,7 @@ def detrend(x, key=None, axis=None):
157157
corresponding functions for more details regarding the algorithms. Can
158158
also be a function that carries out the detrend operation.
159159
160-
axis : integer
160+
axis : int
161161
The axis along which to do the detrending.
162162
163163
See Also
@@ -201,7 +201,7 @@ def demean(x, axis=0):
201201
Array or sequence containing the data
202202
Can have any dimensionality
203203
204-
axis : integer
204+
axis : int
205205
The axis along which to take the mean. See numpy.mean for a
206206
description of this argument.
207207
@@ -222,7 +222,7 @@ def detrend_mean(x, axis=None):
222222
Array or sequence containing the data
223223
Can have any dimensionality
224224
225-
axis : integer
225+
axis : int
226226
The axis along which to take the mean. See numpy.mean for a
227227
description of this argument.
228228
@@ -249,7 +249,7 @@ def detrend_none(x, axis=None):
249249
x : any object
250250
An object containing the data
251251
252-
axis : integer
252+
axis : int
253253
This parameter is ignored.
254254
It is included for compatibility with detrend_mean
255255
@@ -271,7 +271,7 @@ def detrend_linear(y):
271271
y : 0-D or 1-D array or sequence
272272
Array or sequence containing the data
273273
274-
axis : integer
274+
axis : int
275275
The axis along which to take the mean. See numpy.mean for a
276276
description of this argument.
277277
@@ -316,14 +316,14 @@ def stride_windows(x, n, noverlap=None, axis=0):
316316
x : 1D array or sequence
317317
Array or sequence containing the data.
318318
319-
n : integer
319+
n : int
320320
The number of data points in each window.
321321
322-
noverlap : integer
322+
noverlap : int
323323
The overlap between adjacent windows.
324324
Default is 0 (no overlap)
325325
326-
axis : integer
326+
axis : int
327327
The axis along which the windows will run.
328328
329329
References
@@ -385,10 +385,10 @@ def stride_repeat(x, n, axis=0):
385385
x : 1D array or sequence
386386
Array or sequence containing the data.
387387
388-
n : integer
388+
n : int
389389
The number of time to repeat the array.
390390
391-
axis : integer
391+
axis : int
392392
The axis along which the data will run.
393393
394394
References
@@ -694,7 +694,7 @@ def psd(x, NFFT=None, Fs=None, detrend=None, window=None,
694694
695695
%(PSD)s
696696
697-
noverlap : integer
697+
noverlap : int
698698
The number of points of overlap between segments.
699699
The default value is 0 (no overlap).
700700
@@ -754,7 +754,7 @@ def csd(x, y, NFFT=None, Fs=None, detrend=None, window=None,
754754
755755
%(PSD)s
756756
757-
noverlap : integer
757+
noverlap : int
758758
The number of points of overlap between segments.
759759
The default value is 0 (no overlap).
760760
@@ -1059,7 +1059,7 @@ def cohere(x, y, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning,
10591059
10601060
%(PSD)s
10611061
1062-
noverlap : integer
1062+
noverlap : int
10631063
The number of points of overlap between blocks. The default value
10641064
is 0 (no overlap).
10651065

‎lib/matplotlib/rcsetup.py

Copy file name to clipboardExpand all lines: lib/matplotlib/rcsetup.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,19 @@ def validate_path_exists(s):
125125

126126

127127
def validate_bool(b):
128-
"""Convert b to a boolean or raise"""
128+
"""Convert b to ``bool`` or raise."""
129129
if isinstance(b, str):
130130
b = b.lower()
131131
if b in ('t', 'y', 'yes', 'on', 'true', '1', 1, True):
132132
return True
133133
elif b in ('f', 'n', 'no', 'off', 'false', '0', 0, False):
134134
return False
135135
else:
136-
raise ValueError('Could not convert "%s" to boolean' % b)
136+
raise ValueError('Could not convert "%s" to bool' % b)
137137

138138

139139
def validate_bool_maybe_none(b):
140-
"""Convert b to a boolean or raise."""
140+
"""Convert b to ``bool`` or raise, passing through *None*."""
141141
if isinstance(b, str):
142142
b = b.lower()
143143
if b is None or b == 'none':
@@ -147,7 +147,7 @@ def validate_bool_maybe_none(b):
147147
elif b in ('f', 'n', 'no', 'off', 'false', '0', 0, False):
148148
return False
149149
else:
150-
raise ValueError('Could not convert "%s" to boolean' % b)
150+
raise ValueError('Could not convert "%s" to bool' % b)
151151

152152

153153
def _validate_tex_preamble(s):

‎lib/matplotlib/tri/tricontour.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tri/tricontour.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def tricontour(ax, *args, **kwargs):
164164
165165
Optional keyword arguments:
166166
167-
*colors*: [ *None* | string | (mpl_colors) ]
167+
*colors*: [ *None* | str | (mpl_colors) ]
168168
If *None*, the colormap specified by cmap will be used.
169169
170170
If a string, like 'r' or 'red', all levels will be plotted in this

‎tutorials/text/text_props.py

Copy file name to clipboardExpand all lines: tutorials/text/text_props.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
linespacing `float`
2828
multialignment [``'left'`` | ``'right'`` | ``'center'`` ]
2929
name or fontname string e.g., [``'Sans'`` | ``'Courier'`` | ``'Helvetica'`` ...]
30-
picker [None|float|boolean|callable]
30+
picker [None|float|bool|callable]
3131
position (x, y)
3232
rotation [ angle in degrees | ``'vertical'`` | ``'horizontal'`` ]
3333
size or fontsize [ size in points | relative size, e.g., ``'smaller'``, ``'x-large'`` ]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.