HW6, Practice Working with Projects

1. Extending arthritis_proj_demo

i. Create your own branch

If you have not done so yet, clone https://github.com/team-mayes/arthritis_proj_demo. If you have, do a git pull to make sure you have the latest version of this project.

Make a new branch on which you will develop a new feature.

ii. Add some functionality to the project

For example, extend data_proc.py by allowing it to handle different numbers of data points per patient.

iii. Write tests for your new functionality

data_proc.py should have at least 90% coverage.

2. Working with NumPy Arrays

  1. Create the matrix

    \[\begin{split} a = \left( \begin{array}{cccc} 1 & 2 & 3 & 4\\ 5 & 6 & 7 & 8\\ 9 & 10 & 11 & 12\\ 13 & 14 & 15 & 16\end{array} \right)\end{split}\]
In [ ]:

  1. From \(a\), define the submatrix

    \[\begin{split} b = \left( \begin{array}{cc} 6 & 7 & \\ 10 & 11 \end{array} \right)\end{split}\]
In [ ]:

  1. Create a NumPy array \(c\) of all zeros that is 3 x 2, and an array \(d\) of all ones that is 2 x 3.
In [ ]:

  1. Join \(c\) and \(d\) into one 3x4 array, transforming \(d\) as necessary.
In [ ]:

  1. Join \(c\) and \(d\) into one 6x2 array, transforming \(d\) as necessary.
In [ ]: