Reader small image

You're reading from  IPython Notebook Essentials

Product typeBook
Published inNov 2014
Publisher
ISBN-139781783988341
Edition1st Edition
Tools
Right arrow
Author (1)
Luiz Felipe Martins
Luiz Felipe Martins
author image
Luiz Felipe Martins

Luiz Felipe Martins holds a PhD in applied mathematics from Brown University and has worked as a researcher and educator for more than 20 years. His research is mainly in the field of applied probability. He has been involved in developing code for the open source homework system, WeBWorK, where he wrote a library for the visualization of systems of differential equations. He was supported by an NSF grant for this project. Currently, he is an Associate Professor in the Department of Mathematics at Cleveland State University, Cleveland, Ohio, where he has developed several courses in applied mathematics and scientific computing. His current duties include coordinating all first-year calculus sessions.
Read more about Luiz Felipe Martins

Right arrow

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.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
IPython Notebook Essentials
Published in: Nov 2014Publisher: ISBN-13: 9781783988341

Author (1)

author image
Luiz Felipe Martins

Luiz Felipe Martins holds a PhD in applied mathematics from Brown University and has worked as a researcher and educator for more than 20 years. His research is mainly in the field of applied probability. He has been involved in developing code for the open source homework system, WeBWorK, where he wrote a library for the visualization of systems of differential equations. He was supported by an NSF grant for this project. Currently, he is an Associate Professor in the Department of Mathematics at Cleveland State University, Cleveland, Ohio, where he has developed several courses in applied mathematics and scientific computing. His current duties include coordinating all first-year calculus sessions.
Read more about Luiz Felipe Martins