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 89c6712

Browse filesBrowse files
committed
Remove mention of deprecated/removed methods from mlab's docstring.
Also deprecate `mlab.demean`, which is unused should have been removed at the same time as the long-ago removed `denone` and `delinear` (809411c).
1 parent ed8df70 commit 89c6712
Copy full SHA for 89c6712

File tree

Expand file treeCollapse file tree

2 files changed

+7
-111
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-111
lines changed
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
API deprecations
2+
````````````````
3+
4+
The following API elements are deprecated:
5+
6+
- ``mlab.demean``,

‎lib/matplotlib/mlab.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mlab.py
+1-111Lines changed: 1 addition & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""
2-
32
Numerical python functions written for compatibility with MATLAB
43
commands with the same names.
54
@@ -15,26 +14,9 @@
1514
:func:`detrend`
1615
Remove the mean or best fit line from an array
1716
18-
:func:`find`
19-
Return the indices where some condition is true;
20-
numpy.nonzero is similar but more general.
21-
22-
:func:`griddata`
23-
Interpolate irregularly distributed data to a
24-
regular grid.
25-
26-
:func:`prctile`
27-
Find the percentiles of a sequence
28-
29-
:func:`prepca`
30-
Principal Component Analysis
31-
3217
:func:`psd`
3318
Power spectral density using Welch's average periodogram
3419
35-
:func:`rk4`
36-
A 4th order runge kutta integrator for 1D or ND systems
37-
3820
:func:`specgram`
3921
Spectrogram (spectrum over segments of time)
4022
@@ -43,26 +25,6 @@
4325
4426
Functions that don't exist in MATLAB, but are useful anyway:
4527
46-
:func:`cohere_pairs`
47-
Coherence over all pairs. This is not a MATLAB function, but we
48-
compute coherence a lot in my lab, and we compute it for a lot of
49-
pairs. This function is optimized to do this efficiently by
50-
caching the direct FFTs.
51-
52-
:func:`rk4`
53-
A 4th order Runge-Kutta ODE integrator in case you ever find
54-
yourself stranded without scipy (and the far superior
55-
scipy.integrate tools)
56-
57-
:func:`contiguous_regions`
58-
Return the indices of the regions spanned by some logical mask
59-
60-
:func:`cross_from_below`
61-
Return the indices where a 1D array crosses a threshold from below
62-
63-
:func:`cross_from_above`
64-
Return the indices where a 1D array crosses a threshold from above
65-
6628
:func:`complex_spectrum`
6729
Return the complex-valued frequency spectrum of a signal
6830
@@ -78,10 +40,6 @@
7840
:func:`detrend_mean`
7941
Remove the mean from a line.
8042
81-
:func:`demean`
82-
Remove the mean from a line. This function is the same as
83-
:func:`detrend_mean` except for the default *axis*.
84-
8543
:func:`detrend_linear`
8644
Remove the best fit line from a line.
8745
@@ -96,62 +54,6 @@
9654
9755
:func:`apply_window`
9856
Apply a window along a given axis
99-
100-
101-
record array helper functions
102-
-----------------------------
103-
104-
A collection of helper methods for numpyrecord arrays
105-
106-
.. _htmlonly:
107-
108-
See :ref:`misc-examples-index`
109-
110-
:func:`rec2txt`
111-
Pretty print a record array
112-
113-
:func:`rec2csv`
114-
Store record array in CSV file
115-
116-
:func:`csv2rec`
117-
Import record array from CSV file with type inspection
118-
119-
:func:`rec_append_fields`
120-
Adds field(s)/array(s) to record array
121-
122-
:func:`rec_drop_fields`
123-
Drop fields from record array
124-
125-
:func:`rec_join`
126-
Join two record arrays on sequence of fields
127-
128-
:func:`recs_join`
129-
A simple join of multiple recarrays using a single column as a key
130-
131-
:func:`rec_groupby`
132-
Summarize data by groups (similar to SQL GROUP BY)
133-
134-
:func:`rec_summarize`
135-
Helper code to filter rec array fields into new fields
136-
137-
For the rec viewer functions(e rec2csv), there are a bunch of Format
138-
objects you can pass into the functions that will do things like color
139-
negative values red, set percent formatting and scaling, etc.
140-
141-
Example usage::
142-
143-
r = csv2rec('somefile.csv', checkrows=0)
144-
145-
formatd = dict(
146-
weight = FormatFloat(2),
147-
change = FormatPercent(2),
148-
cost = FormatThousands(2),
149-
)
150-
151-
152-
rec2excel(r, 'test.xls', formatd=formatd)
153-
rec2csv(r, 'test.csv', formatd=formatd)
154-
15557
"""
15658

15759
import copy
@@ -320,6 +222,7 @@ def detrend(x, key=None, axis=None):
320222
return np.apply_along_axis(key, axis=axis, arr=x)
321223

322224

225+
@cbook.deprecated("3.1", alternative="detrend_mean")
323226
def demean(x, axis=0):
324227
'''
325228
Return x minus its mean along the specified axis.
@@ -336,11 +239,6 @@ def demean(x, axis=0):
336239
337240
See Also
338241
--------
339-
:func:`delinear`
340-
341-
:func:`denone`
342-
:func:`delinear` and :func:`denone` are other detrend algorithms.
343-
344242
:func:`detrend_mean`
345243
This function is the same as :func:`detrend_mean` except for the
346244
default *axis*.
@@ -410,10 +308,6 @@ def detrend_none(x, axis=None):
410308
411309
See Also
412310
--------
413-
:func:`denone`
414-
This function is the same as :func:`denone` except for the default
415-
*axis*, which has no effect.
416-
417311
:func:`detrend_mean`
418312
419313
:func:`detrend_linear`
@@ -441,10 +335,6 @@ def detrend_linear(y):
441335
442336
See Also
443337
--------
444-
:func:`delinear`
445-
This function is the same as :func:`delinear` except for the default
446-
*axis*.
447-
448338
:func:`detrend_mean`
449339
450340
:func:`detrend_none`

0 commit comments

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