This is documentation for an old release of NumPy (version 1.4.). Read this page in the documentation of the latest stable release (version > 1.17).
Return the base 2 logarithm of the input array, element-wise.
Parameters: | x : array_like
y : array_like
|
---|---|
Returns: | y : ndarray
|
Examples
>>> np.log2([-1, 2, 4])
array([ NaN, 1., 2.])