Closed TomMonks closed 2 years ago
Fancy indexing
The print statement refers to sliced_matrix, but should refer to sub_matrix. This results in an exception.
sliced_matrix
sub_matrix
i.e.
complete_matrix = np.arange(9).reshape(-1, 3) row = [0, 1, 2] col = [2, 1, 2] sub_matrix = complete_matrix[row, col] print(f'original matrix: \n{complete_matrix}') print(f'sub matrix: \n{sub_matrix}')
Fixed in Dev.
Now live at pythonhealthdatascience.com
Fancy indexing
The print statement refers to
sliced_matrix
, but should refer tosub_matrix
. This results in an exception.i.e.