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

Skip to content

Commit 9aaf9fc

Browse files
committed
Remove mlab.exp_safe
1 parent ac0fc08 commit 9aaf9fc

3 files changed

Lines changed: 1 addition & 25 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
@@ -4,6 +4,7 @@ Removal of deprecated :mod:`matplotlib.mlab` code
44
Lots of code inside the :mod:`matplotlib.mlab` module which was deprecated
55
in Matplotlib 2.2 has been removed. See below for a list:
66

7+
- `mlab.exp_safe` (use numpy.exp instead)
78
- `mlab.logspace` (use numpy.logspace instead)
89
- `mlab.cohere_pairs` (use scipy.signal.coherence instead)
910
- `mlab.entropy` (use scipy.stats.entropy instead)

lib/matplotlib/mlab.py

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

12491249

1250-
# *****************************************************************************
1251-
# Globals
1252-
# ****************************************************************************
1253-
# function definitions
1254-
exp_safe_MIN = math.log(2.2250738585072014e-308)
1255-
exp_safe_MAX = 1.7976931348623157e+308
1256-
1257-
1258-
@cbook.deprecated("2.2", 'numpy.exp')
1259-
def exp_safe(x):
1260-
"""
1261-
Compute exponentials which safely underflow to zero.
1262-
1263-
Slow, but convenient to use. Note that numpy provides proper
1264-
floating point exception handling with access to the underlying
1265-
hardware.
1266-
"""
1267-
1268-
if type(x) is np.ndarray:
1269-
return np.exp(np.clip(x, exp_safe_MIN, exp_safe_MAX))
1270-
else:
1271-
return math.exp(x)
1272-
1273-
12741250
@cbook.deprecated("2.2", alternative='numpy.array(list(map(...)))')
12751251
def amap(fn, *args):
12761252
"""

lib/matplotlib/pylab.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@
231231
from matplotlib.mlab import (
232232
amap, base_repr, binary_repr, csv2rec,
233233
demean, detrend, detrend_linear, detrend_mean, detrend_none,
234-
exp_safe,
235234
frange,
236235
identity, ispower2, isvector, l1norm,
237236
l2norm, log2, movavg, norm_flat,

0 commit comments

Comments
 (0)