在哪里可以找到numpy百分位数的源代码

时间:2021-01-03 21:26:43

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.

我在哪里可以找到numpy中百分位函数背后的源代码?我想检查它。我搜索过谷歌,但尚未提出任何建议。

4 个解决方案

#1


12  

To find it on your own system, try inspect:

要在您自己的系统上找到它,请尝试检查:

import inspect
from numpy import percentile
inspect.getfile(percentile)

#2


8  

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

numpy的源代码在Github中,百分位函数可以在lib / function_base.py的第3076行找到

#3


5  

With ipython you can view the source code by putting ?? (two question marks) after the function,

使用ipython,您可以通过放置来查看源代码。 (两个问号)功能后,

from numpy import percentile

percentile??

#4


3  

The source function in numpy

numpy中的源函数

from numpy import percentile, source
print source(percentile)

will output the source code.

将输出源代码。

#1


12  

To find it on your own system, try inspect:

要在您自己的系统上找到它,请尝试检查:

import inspect
from numpy import percentile
inspect.getfile(percentile)

#2


8  

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

numpy的源代码在Github中,百分位函数可以在lib / function_base.py的第3076行找到

#3


5  

With ipython you can view the source code by putting ?? (two question marks) after the function,

使用ipython,您可以通过放置来查看源代码。 (两个问号)功能后,

from numpy import percentile

percentile??

#4


3  

The source function in numpy

numpy中的源函数

from numpy import percentile, source
print source(percentile)

will output the source code.

将输出源代码。