You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
I was just reviewing my comments for the first homework and it simply said that my is_sdd function is incorrect without any explanation. However I tested it multiple times and it worked fine. def is_sdd(A): d_min = min(diag(A)) # the minimum value on the diagonal U = triu(A, 1) L = tril(A, -1) return (d_min > U).all() and (d_min > L).all()
Here is the function, It's very short so I just pasted it here.
Basically I first find the minimum value on the diagonal, and then test if this min is greater than every other non diagonal entries, it return true if the min is greater than every other non diagonal entry.
Can you tell me why is it incorrect?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi there,
I was just reviewing my comments for the first homework and it simply said that my is_sdd function is incorrect without any explanation. However I tested it multiple times and it worked fine.
def is_sdd(A): d_min = min(diag(A)) # the minimum value on the diagonal U = triu(A, 1) L = tril(A, -1) return (d_min > U).all() and (d_min > L).all()
Here is the function, It's very short so I just pasted it here.
Basically I first find the minimum value on the diagonal, and then test if this min is greater than every other non diagonal entries, it return true if the min is greater than every other non diagonal entry.
Can you tell me why is it incorrect?
Thanks!
The text was updated successfully, but these errors were encountered: