def _exp_single(x):
"""Sanitized exponential function.
Since this method internally calls np.exp and carries
the (very likely) possibility to overflow, the method
suppresses all warnings.
#XXX: at some point we might want to let ``suppress_warnings``
# specify exactly which types of warnings it should filter.
Parameters
----------
x : float, int
The number to exp
Returns
-------
val : float
the exp of x
"""
val = np.minimum(__max_exp__, np.exp(x))
return val
评论列表
文章目录