np.log()指代的便是数学中使用的ln函数。 np.log10()指代的便是数学中使用的lg函数。 import numpy as np print(np.log(np.e)) print(np.log10(100))