user6146147
user6146147

Reputation:

R's Dexp function equivalent in Python

Folks,

How can I get equivalent of following R's function in Python

x <- dexp(c(1:10), rate=1)

Upvotes: 0

Views: 344

Answers (1)

AlexNe
AlexNe

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

Related Questions