Python modules with submodules and functions
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?
No comments:
Post a Comment