Return the base 2 logarithm of the input array, element-wise.
x : array_like
Input array.
y : array_like
Optional output array with the same shape as x.
y : ndarray
The logarithm to the base 2 of x element-wise. NaNs are returned where x is negative.
See also
log, log1p, log10
Examples
>>> np.log2([-1, 2, 4]) array([ NaN, 1., 2.])
numpy.log10
numpy.log1p
Enter search terms or a module, class or function name.