pythonnumpylogarithmnatural-logarithm

How do you do natural logs (e.g. "ln()") with numpy in Python?


Using numpy, how can I do the following:

ln(x)

Is it equivalent to:

np.log(x)

I apologise for such a seemingly trivial question, but my understanding of the difference between log and ln is that ln is logspace e?


Solution

  • np.log is ln, whereas np.log10 is your standard base 10 log.