A Need for Speed
Accelerating Your Math with Vectorization and NumPy
This repository corresponds with the tutorial of the same name at PyCon Canada 2019. For questions and comments, email me at kotowick@imperative.systems.
Installation
This code has only been tested on Python 3.7, although it will almost certainly work with many other 3.X versions of Python.
With Python 3 installed, use pip to install required packages:
$ pip3 install jupyterlab numpy matplotlib
Running JupyterLab
This repository uses Jupyter notebook format for the demonstration. First, start JupyterLab:
$ jupyter lab
This will likely automatically open JupyterLab in your browser. If your default browser is Chrome, you might want to copy the link in the shell output and open it in Firefox (Chrome seems to have some performance issues).
Open the notebook
Browse in JupyterLab to the directory where you cloned this repository. There are two notebook files: Complete.ipynb (the complete code) and Template.ipynb (framework for live coding demonstration). Choose the one you want to work with and open it.
Run the code
If you're not familiar with Jupyter / IPython, it's essentially a series of "cells" that you can run independently or in sequence. Output from each cell appears below the cell. To run a cell, click the "Play" icon in the toolbar or press SHIFT + ENTER.