No objects of __all__ are defined in numpy.random subpackage, but no errors are thrown upon importing

Viewed 72

Why all the functions listed in __all__ (of the init file) of numpy.random subpackage work even though they aren't defined there? I can imagine that they are written in C, but still when I do

from numpy.random import *

why doesn't Python throw an error since neither they are defined there (in the init file) nor is there seemingly any mechanism in the file that does the required imports.

0 Answers
Related