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

Skip to content

Commit a865de7

Browse files
committed
Remove mlab.fftsurr
1 parent 3b5bd59 commit a865de7

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

doc/api/next_api_changes/2018-09-18-DS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ in Matplotlib 2.2 has been removed. See below for a list:
2626
- `mlab.slopes`
2727
- `mlab.stineman_interp`
2828
- `mlab.segments_intersect`
29+
- `mlab.fftsurr`
2930
- `mlab.donothing_callback`

lib/matplotlib/mlab.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,22 +1194,6 @@ def cohere(x, y, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning,
11941194
return Cxy, f
11951195

11961196

1197-
@cbook.deprecated('2.2')
1198-
def fftsurr(x, detrend=detrend_none, window=window_none):
1199-
"""
1200-
Compute an FFT phase randomized surrogate of *x*.
1201-
"""
1202-
if np.iterable(window):
1203-
x = window*detrend(x)
1204-
else:
1205-
x = window(detrend(x))
1206-
z = np.fft.fft(x)
1207-
a = 2.*np.pi*1j
1208-
phase = a * np.random.rand(len(x))
1209-
z = z*np.exp(phase)
1210-
return np.fft.ifft(z).real
1211-
1212-
12131197
@cbook.deprecated('2.2')
12141198
def movavg(x, n):
12151199
"""

lib/matplotlib/pylab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
amap, base_repr, binary_repr, csv2rec,
233233
demean, detrend, detrend_linear, detrend_mean, detrend_none,
234234
distances_along_curve, exp_safe,
235-
fftsurr, frange,
235+
frange,
236236
identity, inside_poly, is_closed_polygon, ispower2, isvector, l1norm,
237237
l2norm, log2, movavg, norm_flat,
238238
path_length, poly_below, poly_between,

0 commit comments

Comments
 (0)