Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started