jeudi 6 octobre 2016

How to view the source code of numpy.random.exponential?

I want to see if numpy.random.exponential was implemented using F^{-1} (U) method, where F is the c.d.f of exponential distribution and U is uniform distribution.

I tried numpy.source(random.exponential), but returned 'Not available for this object'. Does it mean this function is not written in Python?

I also tried inspect.getsource(random.exponential), but returned an error saying it's not module, function, etc.




Aucun commentaire:

Enregistrer un commentaire