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

Skip to content

Commit 58f367e

Browse files
committed
DOC: Add some missing parameter headings in mlab.
1 parent 6894ac3 commit 58f367e

File tree

1 file changed

+49
-23
lines changed

1 file changed

+49
-23
lines changed

lib/matplotlib/mlab.py

Lines changed: 49 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,12 @@ def apply_window(x, window, axis=0, return_window=None):
232232
'''
233233
Apply the given window to the given 1D or 2D array along the given axis.
234234
235+
Parameters
236+
----------
235237
*x*: 1D or 2D array or sequence
236238
Array or sequence containing the data.
237239
238-
*winodw*: function or array.
240+
*window*: function or array.
239241
Either a function to generate a window or an array with length
240242
*x*.shape[*axis*]
241243
@@ -286,6 +288,8 @@ def detrend(x, key=None, axis=None):
286288
'''
287289
Return x with its trend removed.
288290
291+
Parameters
292+
----------
289293
*x*: array or sequence
290294
Array or sequence containing the data.
291295
@@ -347,6 +351,8 @@ def demean(x, axis=0):
347351
'''
348352
Return x minus its mean along the specified axis.
349353
354+
Parameters
355+
----------
350356
*x*: array or sequence
351357
Array or sequence containing the data
352358
Can have any dimensionality
@@ -373,6 +379,8 @@ def detrend_mean(x, axis=None):
373379
'''
374380
Return x minus the mean(x).
375381
382+
Parameters
383+
----------
376384
*x*: array or sequence
377385
Array or sequence containing the data
378386
Can have any dimensionality
@@ -418,6 +426,8 @@ def detrend_none(x, axis=None):
418426
'''
419427
Return x: no detrending.
420428
429+
Parameters
430+
----------
421431
*x*: any object
422432
An object containing the data
423433
@@ -447,6 +457,8 @@ def detrend_linear(y):
447457
'''
448458
Return x minus best fit line; 'linear' detrending.
449459
460+
Parameters
461+
----------
450462
*y*: 0-D or 1-D array or sequence
451463
Array or sequence containing the data
452464
@@ -499,6 +511,8 @@ def stride_windows(x, n, noverlap=None, axis=0):
499511
elements may point to the same piece of memory,
500512
so modifying one value may change others.
501513
514+
Parameters
515+
----------
502516
*x*: 1D array or sequence
503517
Array or sequence containing the data.
504518
@@ -564,6 +578,8 @@ def stride_repeat(x, n, axis=0):
564578
elements may point to the same piece of memory, so
565579
modifying one value may change others.
566580
581+
Parameters
582+
----------
567583
*x*: 1D array or sequence
568584
Array or sequence containing the data.
569585
@@ -1581,37 +1597,47 @@ def __init__(self, a, standardize=True):
15811597
compute the SVD of a and store data for PCA. Use project to
15821598
project the data onto a reduced set of dimensions
15831599
1584-
Inputs:
1585-
1586-
*a*: a numobservations x numdims array
1587-
*standardize*: True if input data are to be standardized. If False,
1588-
only centering will be carried out.
1589-
1590-
Attrs:
1591-
1592-
*a* a centered unit sigma version of input a
1600+
Parameters
1601+
----------
1602+
a: np.ndarray
1603+
A numobservations x numdims array
1604+
standardize: bool
1605+
True if input data are to be standardized. If False, only centering
1606+
will be carried out.
15931607
1594-
*numrows*, *numcols*: the dimensions of a
1608+
Attributes
1609+
----------
1610+
a
1611+
A centered unit sigma version of input ``a``.
15951612
1596-
*mu*: a numdims array of means of a. This is the vector that points
1597-
to the origin of PCA space.
1613+
numrows, numcols
1614+
The dimensions of ``a``.
15981615
1599-
*sigma*: a numdims array of standard deviation of a
1616+
mu
1617+
A numdims array of means of ``a``. This is the vector that points
1618+
to the origin of PCA space.
16001619
1601-
*fracs*: the proportion of variance of each of the principal
1602-
components
1620+
sigma
1621+
A numdims array of standard deviation of ``a``.
16031622
1604-
*s*: the actual eigenvalues of the decomposition
1623+
fracs
1624+
The proportion of variance of each of the principal components.
16051625
1606-
*Wt*: the weight vector for projecting a numdims point or array into
1607-
PCA space
1626+
s
1627+
The actual eigenvalues of the decomposition.
16081628
1609-
*Y*: a projected into PCA space
1629+
Wt
1630+
The weight vector for projecting a numdims point or array into
1631+
PCA space.
16101632
1633+
Y
1634+
A projected into PCA space.
16111635
1612-
The factor loadings are in the Wt factor, i.e., the factor
1613-
loadings for the 1st principal component are given by Wt[0].
1614-
This row is also the 1st eigenvector.
1636+
Note
1637+
----
1638+
The factor loadings are in the ``Wt`` factor, i.e., the factor loadings
1639+
for the first principal component are given by ``Wt[0]``. This row is
1640+
also the first eigenvector.
16151641
16161642
"""
16171643
n, m = a.shape

0 commit comments

Comments
 (0)