Singular value decomposition with NumPy

Report a typo

You have a 2D matrix AA. Perform the singular value decomposition. Return the sum of diagonal elements of Σ\Sigma, rounded to one digit after the decimal point. For more info, you can check the NumPy documentation.

The input should be a matrix as a nested list.

The output should be a floating-point number.

Sample Input 1:

[[-0.03400033603799502, -1.1886877303010674, -1.2388559028471826], [-0.3371437186091206, 0.10056990687356157, -0.47125212790749876], [-0.2068224656895615, 0.048609827341071644, -0.20567808974009053]]

Sample Output 1:

2.4
Write a program in Python 3
def solution(mtx:list) -> float:
...
___

Create a free account to access the full topic