doc/source/reference/module_structure.rst
.. _module-structure:
NumPy's module structure
NumPy has a large number of submodules. Most regular usage of NumPy requires only the main namespace and a smaller set of submodules. The rest either have special-purpose or niche namespaces.
Regular/recommended user-facing namespaces for general use:
.. Note: there is no single doc page that covers all of the main namespace as of now. It's hard to create without introducing duplicate references. For now, just link to the "Routines and objects by topic" page.
numpy <routines>numpy.exceptions <routines.exceptions>numpy.fft <routines.fft>numpy.linalg <routines.linalg>numpy.polynomial <numpy-polynomial>numpy.random <numpyrandom>numpy.strings <routines.strings>numpy.testing <routines.testing>numpy.typing <typing>numpy.ctypeslib <routines.ctypeslib> - interacting with NumPy objects with ctypesnumpy.dtypes <routines.dtypes> - dtype classes (typically not used directly by end users)numpy.emath <routines.emath> - mathematical functions with automatic domainnumpy.lib <routines.lib> - utilities & functionality which do not fit the main namespacenumpy.rec <routines.rec> - record arrays (largely superseded by dataframe libraries)numpy.version <routines.version> - small module with more detailed version infoPrefer not to use these namespaces for new code. There are better alternatives and/or this code is deprecated or isn't reliable.
numpy.char <routines.char> - legacy string functionality, only for fixed-width stringsnumpy.f2py <python-module-numpy.f2py> - Fortran binding generation (usually used from the command line only)numpy.ma <routines.ma> - masked arrays (not very reliable, needs an overhaul)numpy.matlib <routines.matlib> (pending deprecation) - functions supporting matrix instances.. This will appear in the left sidebar on this page. Keep in sync with the contents above!
.. toctree:: :hidden:
numpy.exceptions <routines.exceptions> numpy.fft <routines.fft> numpy.linalg <routines.linalg> numpy.polynomial <routines.polynomials-package> numpy.random <random/index> numpy.strings <routines.strings> numpy.testing <routines.testing> numpy.typing <typing> numpy.ctypeslib <routines.ctypeslib> numpy.dtypes <routines.dtypes> numpy.emath <routines.emath> numpy.lib <routines.lib> numpy.rec <routines.rec> numpy.version <routines.version> numpy.char <routines.char> numpy.f2py <../f2py/index> numpy.ma <routines.ma> numpy.matlib <routines.matlib>