Question: Write a function that accepts a 2 - dimensional numpy Jarray. The function should: Validate that the 2 - dimensional array is a square. Return

Write a function that accepts a 2-dimensional numpy Jarray. The function should:
Validate that the 2-dimensional array is a square. Return -1 if it is not.
You can assume the 2-dimensional array is numeric. Return a tuple with two elements, which are the sums of the two diagonals.
Make your function size insensitive, it can be 33, or 44,dots nxn matrix.
Write a function that accepts a 2 - dimensional

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!