exp2
Description
Calculate the base-2 exponential of each element in the input. That is,
.
Mandatory Input Parameters
Parameter |
Type |
Description |
|---|---|---|
x |
array_like |
Input array or scalar |
Optional Input Parameters
Return Value
Type |
Description |
|---|---|
ndarray/scalar |
Element-wise base-2 exponential of x |
Examples
1 2 3 4 5 6 7 8 | >>> import numpy as np >>> >>> np.exp2(4) 16.0 >>> >>> np.exp2([1, 2, 3]) array([2., 4., 8.]) >>> |
Parent topic: Basic Operation Functions