Book Image

IPython Notebook Essentials

By : Luiz Felipe Martins
Book Image

IPython Notebook Essentials

By: Luiz Felipe Martins

Overview of this book

Table of Contents (15 chapters)
IPython Notebook Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Importing modules


The steps to load some of the important modules are as follows:

  • To load NumPy and matplotlib to work interactively, along with inline graphics, run the following command:

    pylab inline
    
  • To load NumPy and matplotlib without importing names into the current namespace, with inline graphics, run the following command line:

    pylab -–no-import-all inline
    
  • To load SciPy modules, 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 NumPy functions and objects, use numpy or np.

  • For interactive graphics, use pyplot or plt.

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.