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

Skip to content

Commit 8f9b0c6

Browse files
committed
Remove mlab.l1norm
1 parent 2821f1b commit 8f9b0c6

3 files changed

Lines changed: 2 additions & 10 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
@@ -8,6 +8,7 @@ in Matplotlib 2.2 has been removed. See below for a list:
88
- `mlab.amap`
99
- `mlab.logspace` (use numpy.logspace instead)
1010
- `mlab.rms_flat`
11+
- `mlab.l1norm` (use ``numpy.linalg.norm(a, ord=1)`` instead)
1112
- `mlab.cohere_pairs` (use scipy.signal.coherence instead)
1213
- `mlab.entropy` (use scipy.stats.entropy instead)
1314
- `mlab.normpdf` (use scipy.stats.norm.pdf instead)

lib/matplotlib/mlab.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,15 +1246,6 @@ def movavg(x, n):
12461246
12471247
"""
12481248

1249-
@cbook.deprecated("2.2", alternative='numpy.linalg.norm(a, ord=1)')
1250-
def l1norm(a):
1251-
"""
1252-
Return the *l1* norm of *a*, flattened out.
1253-
1254-
Implemented as a separate function (not a call to :func:`norm` for speed).
1255-
"""
1256-
return np.sum(np.abs(a))
1257-
12581249

12591250
@cbook.deprecated("2.2", alternative='numpy.linalg.norm(a, ord=2)')
12601251
def l2norm(a):

lib/matplotlib/pylab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
base_repr, binary_repr, csv2rec,
233233
demean, detrend, detrend_linear, detrend_mean, detrend_none,
234234
frange,
235-
identity, ispower2, isvector, l1norm,
235+
identity, ispower2, isvector,
236236
l2norm, log2, movavg, norm_flat,
237237
window_hanning, window_none)
238238

0 commit comments

Comments
 (0)