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

Skip to content

Commit e40dc94

Browse files
committed
Remove mlab.logspace
1 parent 20bfcff commit e40dc94

File tree

3 files changed

+7
-28
lines changed

3 files changed

+7
-28
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Removal of deprecated :mod:`matplotlib.mlab` code
2+
-------------------------------------------------
3+
4+
Lots of code inside the :mod:`matplotlib.mlab` module which was deprecated
5+
in Matplotlib 2.2 has been removed. See below for a list:
6+
7+
- `mlab.logspace`

lib/matplotlib/mlab.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,6 @@
7070
import math
7171

7272

73-
@cbook.deprecated("2.2", alternative='numpy.logspace or numpy.geomspace')
74-
def logspace(xmin, xmax, N):
75-
'''
76-
Return N values logarithmically spaced between xmin and xmax.
77-
78-
'''
79-
return np.exp(np.linspace(np.log(xmin), np.log(xmax), N))
80-
81-
8273
def window_hanning(x):
8374
'''
8475
Return x times the hanning window of len(x).

lib/matplotlib/tests/test_mlab.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,6 @@ def test_prctile(input, percentile):
5555
np.percentile(input, percentile))
5656

5757

58-
@pytest.mark.parametrize('xmin, xmax, N', [
59-
(.01, 1000., 6),
60-
(.03, 1313., 7),
61-
(.03, 1313., 0),
62-
(.03, 1313., 1),
63-
], ids=[
64-
'tens',
65-
'primes',
66-
'none',
67-
'single',
68-
])
69-
def test_logspace(xmin, xmax, N):
70-
with pytest.warns(MatplotlibDeprecationWarning):
71-
res = mlab.logspace(xmin, xmax, N)
72-
targ = np.logspace(np.log10(xmin), np.log10(xmax), N)
73-
assert_allclose(targ, res)
74-
assert res.size == N
75-
76-
7758
class TestStride(object):
7859
def get_base(self, x):
7960
y = x

0 commit comments

Comments
 (0)