Python for maths
Tags: python, maths, resources
Published: 2019-03-22 11:04:41

---
title: "Python for maths"
published: true
description: "Using Python to solve mathematical problems"
tags: python,maths,resources
canonical_url: https://learnbyexample.github.io/python-for-maths/
---

![sample plot](https://learnbyexample.github.io/images/python_for_maths/gravitational_plot.png)

The above image was generated using `matplotlib` courtesy code provided by [Doing Math with Python](https://github.com/doingmathwithpython/code/blob/master/chapter2/Chapter2.ipynb) book.

Last month, I had an opportunity to conduct beginner Python workshop for maths department students in an arts and science college. It was a great experience and I had my first taste of how Python could be applied for mathematical problems. Presented here are bunch of useful links that I gathered as resources for the students. 

# Documentation links

* [docs.python](https://docs.python.org/3/)
* [numpy and scipy](https://docs.scipy.org/doc/)
* [matplotlib](https://matplotlib.org/api/index.html)

<br>

# Books and courses

* [Doing Math with Python](https://doingmathwithpython.github.io/)
* [Maths with Python](https://maths-with-python.readthedocs.io/en/latest/)
    * [pdf version](https://media.readthedocs.org/pdf/maths-with-python/latest/maths-with-python.pdf)
* [Doing mathematics with Python](https://github.com/drvinceknight/Python-Mathematics-Handbook)
* [Lectures on scientific computing with Python](https://github.com/jrjohansson/scientific-python-lectures)
* [Digital Signal Processing in Python](https://greenteapress.com/thinkdsp/html/index.html)
* [Audio Signal Processing for Music Applications](https://www.coursera.org/learn/audio-signal-processing)
* [Mathematical Thinking in Computer Science](https://www.coursera.org/learn/what-is-a-proof)

<br>

# Python for beginners

* [automatetheboringstuff](https://automatetheboringstuff.com/2e/) 
* [Think Python](https://greenteapress.com/wp/think-python-2e/)
* [How to Think Like a Computer Scientist: Interactive Edition](https://interactivepython.org/courselib/static/thinkcspy/index.html)
* [Comprehensive Python Cheatsheet](https://gto76.github.io/python-cheatsheet/)
* [Python tips and features on Stackoverflow](https://stackoverflow.com/questions/101268/hidden-features-of-python)
* [slice notations and assignments](https://stackoverflow.com/questions/509211/explain-pythons-slice-notation)
* [list comprehensions](http://treyhunner.com/2015/12/python-list-comprehensions-now-in-color/)
* [Visualize code execution](http://www.pythontutor.com/visualize.html#mode=edit)
* [Problem solving skills](https://ryanstutorials.net/problem-solving-skills/)

<br>

# numpy, scipy, matplotlib

* [From Python to Numpy](https://www.labri.fr/perso/nrougier/from-python-to-numpy/)
* [Advanced Numpy Techniques](https://nbviewer.jupyter.org/github/vlad17/np-learn/blob/master/presentation.ipynb)
* [List of data science Python notebooks](https://github.com/donnemartin/data-science-ipython-notebooks)
* [Scipy Lecture Notes](https://scipy-lectures.org/)
* [matplotlib guide](https://realpython.com/python-matplotlib-guide/)
* [effective matplotlib](https://pbpython.com/effective-matplotlib.html)
* [top 50 matplotlib visualizations](https://www.machinelearningplus.com/plots/top-50-matplotlib-visualizations-the-master-plots-python/)
* [matplotlib cheat sheet](https://github.com/juliangaal/python-cheat-sheet/tree/master/Matplotlib)
* [Scientific Python Cheatsheet](https://ipgp.github.io/scientific_python_cheat_sheet/)
* [animatplot](https://animatplot.readthedocs.io/en/stable/tutorial/getting_started..html)
* [benchmarking, profiling and optimising Python code](https://alimanfoo.github.io/2017/01/23/go-faster-python.html) - includes discussion on numpy

<br>

# More resources

* [What programming language should a professional mathematician know?](https://mathoverflow.net/questions/308797/what-programming-language-should-a-professional-mathematician-know)
* [Python Beginners Guide for Mathematics](https://wiki.python.org/moin/BeginnersGuide/Mathematics)
* [Interesting Jupyter Notebooks on mathematics](https://github.com/jupyter/jupyter/wiki/A-gallery-of-interesting-Jupyter-Notebooks#mathematics)
* [Maths curated resource links](https://github.com/learnbyexample/curated_resources/blob/master/Education.md#maths)
* [Sagemath](https://www.sagemath.org/)
* [GNU Octave](https://www.gnu.org/software/octave/)

<br>

Let me know your favorite resources for Python and maths.