Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/284.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何转换为log base 2?_Python_Numpy_Math_Logarithm - Fatal编程技术网

Python 如何转换为log base 2?

Python 如何转换为log base 2?,python,numpy,math,logarithm,Python,Numpy,Math,Logarithm,如何将以下代码转换为log base 2 df["col1"] = df["Target"].map(lambda i: np.log(i) if i > 0 else 0) 我想您只是想使用而不是。这是否回答了您的问题?不是机器学习问题,请不要发送不相关的标签(已删除)。

如何将以下代码转换为log base 2

df["col1"] = df["Target"].map(lambda i: np.log(i) if i > 0 else 0)

我想您只是想使用而不是。

这是否回答了您的问题?不是机器学习问题,请不要发送不相关的标签(已删除)。