Python Reading
Key Ideas
- Trying a program that uses SciPy. (Note: ensure that
numpy, scipy and matplotlib are installed)
- Running a program from the command line.
Installing NumPy, SciPy and MatPlotLib
- Mac:
- pip3 install --user numpy
- pip3 install --user scipy
- pip3 install --user matplotlib
- Windows:
- Download numpy
- In the command prompt, from the director where numpy is downloaded:
python -m pip install numpy-1.12.1+mkl-cp36-cp36m-win32.whl
- Download scipy
- In the command prompt, from the directory where scipy is downloaded:
python -m pip install scipy-0.19.0-cp36-cp36m-win32.whl
- Download matplotlib
- In the command prompt, from the directory where matplotlib is downloaded:
python -m pip install matplotlib-2.0.0-cp36-cp36m-win32.whl
In-Class Activity
Active Learning
- Run bessel.py from within IDLE and also via the command line.
- Try some different arguments.
- What are the two items that this code plots?
- Do you understand the code? (Use SciPy documentation as needed.)