Book Image

IPython Interactive Computing and Visualization Cookbook

By : Cyrille Rossant
Book Image

IPython Interactive Computing and Visualization Cookbook

By: Cyrille Rossant

Overview of this book

Table of Contents (22 chapters)
IPython Interactive Computing and Visualization Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 4. Profiling and Optimization

In this chapter, we will cover the following topics:

  • Evaluating the time taken by a statement in IPython

  • Profiling your code easily with cProfile and IPython

  • Profiling your code line-by-line with line_profiler

  • Profiling the memory usage of your code with memory_profiler

  • Understanding the internals of NumPy to avoid unnecessary array copying

  • Using stride tricks with NumPy

  • Implementing an efficient rolling average algorithm with stride tricks

  • Making efficient array selections in NumPy

  • Processing huge NumPy arrays with memory mapping

  • Manipulating large arrays with HDF5 and PyTables

  • Manipulating large heterogeneous tables with HDF5 and PyTables