.. _software: ============================================================= Software for the course ============================================================= Python ------ Please use Python for computing in this class. If you don't know Python but are used to Matlab, this `Numpy for Matlab Users `_ page might be very useful. Even if you know Python and Numpy, this page has some useful tips! Some other resources: - `AMath 583 notes `_ (from 2013) on Python , - `Python Tutorial `_, - `IPython documentation `_ - `Jupyter Notebook documentation `_ - `NumPy Documentation `_ - `NumPy for Matlab users `_ Useful list of commands (and Matlab equivalents) - `Matplotlib Gallery `_ (illustrating how to make various types of plots) - `SciPy Documentation `_ includes many other scientific packages. - `SymPy Documentation `_ for symbolic mathematics - Many other tutorials can be found online. To use Python effectively you will need `numpy `_ (which supports arrays and many mathematical operations), `matplotlib `_ (matlab-style plotting). The `IPython shell `_ and/or `Jupyter notebooks `_ are highly recommended for interactive work, see below. The `Anaconda Python Distribution `_ is one easy way to get everything you need. If you install this, you can also then use the `conda package installer `_ to install various extensions easily. You might also want to check out `conda environments `_ as a way to compartmentalize versions of Python packages for different projects. The notebooks for this class should be compatible with either Python 2.7 or 3.x. The main difference that affects us is that in Python 3 `print` is a function rather than a statement, e.g. :: print('x has the value %.6e' % x) rather than:: print 'x has the value %.6e' % x To get a code written using the print function to work in Python 2, you can include this line at the top of the file:: from __future__ import print_function (with 2 underscores before and after `future`). Jupyter notebooks ----------------- See http://jupyter.org for more information and documentation. The notebook platform is rapidly being improved but as a result how things behave often depend on what version you have installed. If you installed the Anaconda Python, you can insure you have jupyter and are up to date via the bash commands:: conda install jupyter conda update jupyter Then in a bash shell you should be able to execute:: jupyter notebook to start the notebook server. You can then navigate your browser to the address shown when the notebook starts, e.g. :: http://localhost:8888/tree If you want to easily run notebooks without installing any software, you might try `CoCalc `_ (previously known as SageMathCloud) or `binder `_. See :ref:`codes` for more information about running the notebooks for this class.