Reputation:
Folks,
How can I get equivalent of following R's function in Python
x <- dexp(c(1:10), rate=1)
Upvotes: 0
Views: 344
Reputation: 969
Python itself does not have many predefined functions, but you can use scipy.stats: @Terminal:
pip install scipy
@Python:
from scipy.stats import expon
print(expon.pdf(1))
https://docs.scipy.org/doc/scipy/reference/stats.html
Upvotes: 2