Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3fc1185

Browse files
committed
Standardize parameter types in docs
1 parent aa18f5a commit 3fc1185

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

lib/matplotlib/backends/backend_pdf.py

Lines 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

Lines 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

Lines 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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,19 @@ def validate_path_exists(s):
121121

122122

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

134134

135135
def validate_bool_maybe_none(b):
136-
"""Convert b to a boolean or raise."""
136+
"""Convert b to ``bool`` or raise, passing through *None*."""
137137
if isinstance(b, str):
138138
b = b.lower()
139139
if b is None or b == 'none':
@@ -143,7 +143,7 @@ def validate_bool_maybe_none(b):
143143
elif b in ('f', 'n', 'no', 'off', 'false', '0', 0, False):
144144
return False
145145
else:
146-
raise ValueError('Could not convert "%s" to boolean' % b)
146+
raise ValueError('Could not convert "%s" to bool' % b)
147147

148148

149149
def _validate_tex_preamble(s):

lib/matplotlib/tri/tricontour.py

Lines 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

Lines 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)