Importing modules
The steps to load some of the important modules are as follows:
- To load
NumPyand matplotlib to work interactively, along with inline graphics, run the following command:pylab inline - To load
NumPyand matplotlib without importing names into the current namespace, with inline graphics, run the following command line:pylab -–no-import-all inline - To load
SciPymodules, use any of the following standard Python import commands:import scipy.<module> import scipy.<module> as <local-name> from scipy.<module> import <function>
If the –no-import-all options is used, the functions and objects have to be prefixed by the appropriate module name as follows:
- For
NumPyfunctions and objects, usenumpyornp. - For interactive graphics, use
pyplotorplt.
Modules from libraries installed in the system as well as the user-created modules with the.py extension can be imported through the standard Python mechanism.