Week 4: September 21 - 25
We continue our exploration of the "Mayfly model", paying particular attention to the long-term behavior of the system.
Although mathematics deals with real numbers of infinite precision, these numbers must be represented in a computer using a finite number of digits. We examine ways in which this can be done effectively, and some of the problems and issues that arise in doing so.
Week 4 Notebook
- IPython "magics": %timeit and %%timeit
- List comprehensions
- More plotting options
NumPy is the standard package for numerical computing in Python. It uses a new container for numerical data - the ndarray - that supports fast and efficient computation. NumPy also defines routines for accessing and manipulating these arrays.
- Array creation
- Array operations
- Multi-dimensional arrays
- Array indexing and slicing
Sample Quiz 3
- Labeling plots
Assignment 3: Mayfly Model Exploration
- Explore the behavior of the system for different "b" values, including both the transient and the asymptotic behavior.
- Generate a picture of the asymptotic behavior for a large number of "b" values.
- What is the repertoire of asymptotic dynamics? Is this what you would expect?
- Use plot to examine the transient behaviour of the model.
- Use the "alpha" value option to plot to display the asymptotic behavior with semi-transparent points.
- Use vectorization with NumPy arrays to explore different "b" values without using Python loops.