Book Image

Mastering IPython 4.0

By : Thomas Bitterman, Dipanjan Deb
Book Image

Mastering IPython 4.0

By: Thomas Bitterman, Dipanjan Deb

Overview of this book

IPython is an interactive computational environment in which you can combine code execution, rich text, mathematics, plots, and rich media. This book will get IPython developers up to date with the latest advancements in IPython and dive deep into interactive computing with IPython. This an advanced guide on interactive and parallel computing with IPython will explore advanced visualizations and high-performance computing with IPython in detail. You will quickly brush up your knowledge of IPython kernels and wrapper kernels, then we'?ll move to advanced concepts such as testing, Sphinx, JS events, interactive work, and the ZMQ cluster. The book will cover topics such as IPython Console Lexer, advanced configuration, and third-party tools. By the end of this book, you will be able to use IPython for interactive and parallel computing in a high-performance computing environment.
Table of Contents (18 chapters)
Mastering IPython 4.0
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
6
Works Well with Others – IPython and Third-Party Tools
Index

Data parallelism


So far we have talked primarily about the way tasks are distributed, and have left the data in the background. It can be instructive to look at the way data is obtained and made available to the tasks, also. After all, if a task is starved for data it cannot produce any results.

No data dependence

This is the situation where each task either needs no data, or can independently generate it (perhaps through sensor readings or a random number generator). This can often happen when running Monte Carlo simulations, where the only input to each simulation is a random number.

Note

Monte Carlo simulation

It is often the case in a simulation, that exact values for parameters are not known. When this is the case, the Monte Carlo method entails running the simulation multiple times, with each run using a valid but randomly chosen value for each parameter. The results of the runs can then be combined statistically to provide an estimate of the desired result.

In this example, each instance...