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

Skip to content

Commit c26f1d6

Browse files
committed
Remove mlab.l2norm
1 parent 8f9b0c6 commit c26f1d6

3 files changed

Lines changed: 2 additions & 11 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ in Matplotlib 2.2 has been removed. See below for a list:
99
- `mlab.logspace` (use numpy.logspace instead)
1010
- `mlab.rms_flat`
1111
- `mlab.l1norm` (use ``numpy.linalg.norm(a, ord=1)`` instead)
12+
- `mlab.l2norm` (use ``numpy.linalg.norm(a, ord=2)`` instead)
1213
- `mlab.cohere_pairs` (use scipy.signal.coherence instead)
1314
- `mlab.entropy` (use scipy.stats.entropy instead)
1415
- `mlab.normpdf` (use scipy.stats.norm.pdf instead)

lib/matplotlib/mlab.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,16 +1247,6 @@ def movavg(x, n):
12471247
"""
12481248

12491249

1250-
@cbook.deprecated("2.2", alternative='numpy.linalg.norm(a, ord=2)')
1251-
def l2norm(a):
1252-
"""
1253-
Return the *l2* norm of *a*, flattened out.
1254-
1255-
Implemented as a separate function (not a call to :func:`norm` for speed).
1256-
"""
1257-
return np.sqrt(np.sum(np.abs(a) ** 2))
1258-
1259-
12601250
@cbook.deprecated("2.2", alternative='numpy.linalg.norm(a.flat, ord=p)')
12611251
def norm_flat(a, p=2):
12621252
"""

lib/matplotlib/pylab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
demean, detrend, detrend_linear, detrend_mean, detrend_none,
234234
frange,
235235
identity, ispower2, isvector,
236-
l2norm, log2, movavg, norm_flat,
236+
log2, movavg, norm_flat,
237237
window_hanning, window_none)
238238

239239
from matplotlib import cbook, mlab, pyplot as plt

0 commit comments

Comments
 (0)