Return the base 2 logarithm.
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 elementwise. 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