I had a question on how libraries like numpy work. When I import numpy
, I'm given access to a host of built in classes, functions, and constants such as numpy.array
, numpy.sqrt
etc.
But within numpy there are additional submodules such as numpy.testing
.
How is this done? In my limited experience, modules with submodules are simply folders with a __init__.py
file, while modules with functions/classes are actual python files. How does one create a module "folder" that also has functions/classes?