scipy.special.exp2¶
- scipy.special.exp2(x) = <ufunc 'exp2'>¶
Compute
2**x
element-wise.- Parameters
- xarray_like
x must contain real numbers.
- Returns
- float
2**x
, computed element-wise.
Examples
>>> from scipy.special import exp2
>>> exp2(3) 8.0 >>> x = np.array([[-1, -0.5, 0], [0.5, 1, 1.5]]) >>> exp2(x) array([[ 0.5 , 0.70710678, 1. ], [ 1.41421356, 2. , 2.82842712]])