python - SciPy 源代码 - 找不到导入的模块

标签 python module github package scipy

我正在玩scipy源代码,there

我正在寻找ndimage.measurements中的方法分水岭。方法正在调用一个神秘的 _nd_image.watershed_ift(...) 并且模块 measurements.py 会导入 _nd_image。但是,我在父存储库和其他任何地方找不到 _nd_image

我想知道_nd_image是否引用了src文件夹中watershed_ift的C实现。但是,nd_image.c 中不存在该算法的 C 实现。

这个_nd_image模块是什么?我在哪里可以找到这个分水岭算法?

最佳答案

您对它在 C 中的怀疑是正确的; nd_image.c定义 Py_WatershedIFT (公开为 watershed_ift )。这会调用ni_measure.c中的实际实现NI_WatershedIFT .

关于python - SciPy 源代码 - 找不到导入的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11871833/

相关文章:

python - 在 linux 上升级 pandas

python - math.floor(N) 与 N//1

perl - 在 Perl 中,为什么我需要 Exporter?

github - github 和编码流程

php - Smarty 作为子模块

python - 圣人情节斜率场和微分方程

python - 在 python 中,selenium 模块。如何使用火狐驱动

python - 在 Ninja IDE 上导入 Python 模块时遇到问题

ruby - 访问 Ruby 模块内的哈希值的最佳方式

javascript - 由于警告 : RequireJS failed.,所有检查都失败了使用 --force 继续