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.
Main namespaces
Regular/recommended user-facing namespaces for general use:
Special-purpose namespaces
- interacting with NumPy objects with
- dtype classes (typically not used directly by end users)
- mathematical functions with automatic domain
- utilities & functionality which do not fit the main namespace
- record arrays (largely superseded by dataframe libraries)
- small module with more detailed version info
Legacy namespaces
Prefer not to use these namespaces for new code. There are better alternatives and/or this code is deprecated or isn’t reliable.
- legacy string functionality, only for fixed-width strings
- Fortran binding generation (usually used from the command line only)
- masked arrays (not very reliable, needs an overhaul)
(pending deprecation) - functions supporting matrix instances