Question: Review and practice Python coding problem before beginning the chapter: 4. Write a function in python called TestStrictDiag that tests if a given nxn matrix

Review and practice Python coding problem before beginning the chapter: 4. Write a function in python called TestStrictDiag that tests if a given nxn matrix A is strictly diagonally dominant. Your function should have a single input (the matrix A) and return the output 1 if the matrix is strictly diagonally dominant or 0 otherwise. Test your function on the matrices below. You may find the functions np.sum and np.abs helpful. 4.01 1 2 0 4.01 1 2 4 3 1 -4.01 -1 -2 0 1 -4.01 - 1 - 2 A1 = 2 -4 -2 A2 = A3 = 1 -2 4.01 -1 0 1 -2 4.01 - 1 -3 4 -1 -2 0 -4.01 -1 -1 -2 1 -1 1 -1 4.01
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
