首先要导入 math 模块:
import math
import numpy as np
math.log(8,2),此为以2为底8的对数
等于 math.log2(8);
等于np.log2(8)
自然对数: 以e为底的对数。
e = math.e 约等于 2.718281828459045;
x的自然对数为:
math.log(x,math.e);
等于np.log(x)。
python的对数
最新推荐文章于 2024-06-05 17:46:41 发布
2955

被折叠的 条评论
为什么被折叠?



