0
from . import _nd_image

My question is that there is no such file _nd_image.py in the current directory and code uses this above import statement and below, somewhere in code there is a statement _nd_image.fun().

How is it possible to import a file which is not present in the directory and use it to call some function.

The code is taken from here

import statement in at line no.36 

and usage of _nd_image is at line no. 143

inspectorG4dget
  • 110,290
  • 27
  • 149
  • 241

1 Answers1

2

There is probably a file _nd_image.pyd or _nd_image.so in the directory. This is a Python extension library written in C. These files act as normal Python modules that can be imported. See here and here for more info.

Community
  • 1
  • 1
BrenBarn
  • 242,874
  • 37
  • 412
  • 384