Python Reading
- Read the introduction entitled What is NumPy?
- Video Tutorial
- Install NumPy on your machine:
- Windows: python -m pip install numpy
- Mac: pip3 install--user numpy
- NumPy is Python library written in C to provide fast numerical methods for scientific computation.
- NumPy enables Python users to use a data structure called an array. You can conceptualize an array as an efficient implementation of a list.
- Today we will learn about 1-D (one dimensional) arrays. However, Python arrays can contain any number of dimensions.
- One way to gain insight into numeric data is to calculate its mean and standard deviation. More information.
- Sometimes it is useful to sort numeric data into either ascending or descending order. Why?
- Download demo.py and conduct experiments until you fully understand it.
- Can you explain how the sort function works?
- The sort function does not return anything. Why does the shoulder_heights array in the main program change?
- Can you modify the sort function so that it sorts the data into descending order?
- The NumPy module includes a sort function. Can you find the relevant documentation and then use it?
- What are other useful things you might want to do with a 1-D array?
- Work through tutorial1.py to see various methods found in the Numpy library.