numpy log

1.以10为底的对数

print(np.log10(100))
10

2.以2为底的对数

print(np.log2(4))
2

3.以自然对数为底的对数

print(np.log(np.e))
1

4. 以n为底的对数

print(np.log(9) / np.log(3))
2

http://www.waitingfy.com/archives/5074

5074

Leave a Reply

Name and Email Address are required fields.
Your email will not be published or shared with third parties.