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

Skip to content

Commit a934ad8

Browse files
committed
Remove mlab.ispower2
1 parent 76864f0 commit a934ad8

3 files changed

Lines changed: 2 additions & 16 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
@@ -15,6 +15,7 @@ in Matplotlib 2.2 has been removed. See below for a list:
1515
- `mlab.identity` (use numpy.identity instead)
1616
- `mlab.base_repr`
1717
- `mlab.binary_repr`
18+
- `mlab.ispower2`
1819
- `mlab.log2` (use numpy.log2 instead)
1920
- `mlab.cohere_pairs` (use scipy.signal.coherence instead)
2021
- `mlab.entropy` (use scipy.stats.entropy instead)

lib/matplotlib/mlab.py

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

12491249

1250-
@cbook.deprecated("2.2")
1251-
def ispower2(n):
1252-
"""
1253-
Returns the log base 2 of *n* if *n* is a power of 2, zero otherwise.
1254-
1255-
Note the potential ambiguity if *n* == 1: 2**0 == 1, interpret accordingly.
1256-
"""
1257-
1258-
bin_n = binary_repr(n)[1:]
1259-
if '1' in bin_n:
1260-
return 0
1261-
else:
1262-
return len(bin_n)
1263-
1264-
12651250
@cbook.deprecated("2.2")
12661251
def isvector(X):
12671252
"""

lib/matplotlib/pylab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
from matplotlib.mlab import (
232232
csv2rec,
233233
demean, detrend, detrend_linear, detrend_mean, detrend_none,
234-
ispower2, isvector,
234+
isvector,
235235
movavg,
236236
window_hanning, window_none)
237237

0 commit comments

Comments
 (0)