SciPy

This is documentation for an old release of SciPy (version 1.4.1). Read this page in the documentation of the latest stable release (version 1.15.0).

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]])

Previous topic

scipy.special.exp10

Next topic

scipy.special.radian