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

Skip to content

Commit a24346e

Browse files
committed
Remove mlab.center_matrix
1 parent f69a814 commit a24346e

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
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
@@ -14,4 +14,5 @@ in Matplotlib 2.2 has been removed. See below for a list:
1414
- `mlab.PCA`
1515
- `mlab.prctile` (use numpy.percentile instead)
1616
- `mlab.prctile_rank`
17+
- `mlab.center_matrix`
1718
- `mlab.donothing_callback`

lib/matplotlib/mlab.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,23 +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 center_matrix(M, dim=0):
1199-
"""
1200-
Return the matrix *M* with each row having zero mean and unit std.
1201-
1202-
If *dim* = 1 operate on columns instead of rows. (*dim* is
1203-
opposite to the numpy axis kwarg.)
1204-
"""
1205-
M = np.asarray(M, float)
1206-
if dim:
1207-
M = (M - M.mean(axis=0)) / M.std(axis=0)
1208-
else:
1209-
M = (M - M.mean(axis=1)[:, np.newaxis])
1210-
M = M / M.std(axis=1)[:, np.newaxis]
1211-
return M
1212-
1213-
12141197
@cbook.deprecated('2.2', 'scipy.integrate.ode')
12151198
def rk4(derivs, y0, t):
12161199
"""

lib/matplotlib/pylab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230
## We are still importing too many things from mlab; more cleanup is needed.
231231

232232
from matplotlib.mlab import (
233-
amap, base_repr, binary_repr, bivariate_normal, center_matrix, csv2rec,
233+
amap, base_repr, binary_repr, bivariate_normal, csv2rec,
234234
demean, detrend, detrend_linear, detrend_mean, detrend_none, dist,
235235
dist_point_to_segment, distances_along_curve, exp_safe,
236236
fftsurr, frange, get_sparse_matrix, get_xyz_where, griddata,

0 commit comments

Comments
 (0)