I am playing with scipy source code, there.
I am looking to method watershed in ndimage.measurements. Method is calling a mysterious _nd_image.watershed_ift(...) and module measurements.py does import _nd_image. However, I cannot find _nd_image in parent repository, and anywhere else.
I wonder if _nd_image refers to C implementation of watershed_ift in src folder. However, C implementation of the algorithm is not present in nd_image.c.
What is this _nd_image module? Where could I find this watershed algorithm?
Your suspicion that it’s in C is correct; nd_image.c defines
Py_WatershedIFT(exposed as watershed_ift). This calls the actual implementationNI_WatershedIFTin ni_measure.c.