Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to find source code for numpy's percentile [closed]

Tags:

python

numpy

Where can I find the source code behind the percentile function in numpy? I want to inspect it. I have searched Google but haven't come up with anything yet.

like image 207
user2763361 Avatar asked Apr 25 '14 03:04

user2763361


People also ask

What is percentile in Python?

Percentiles are used in statistics to give you a number that describes the value that a given percent of the values are lower than.


2 Answers

To find it on your own system, try inspect:

import inspect
from numpy import percentile
inspect.getfile(percentile)
like image 115
joc Avatar answered Oct 21 '22 03:10

joc


The source code of numpy is in Github and the percentile function can be found on line 3076 in lib/function_base.py

like image 39
Hamatti Avatar answered Oct 21 '22 04:10

Hamatti