MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / is_symmetric2

Function is_symmetric2

numpy_class/exercises/ex5.py:19–29  ·  view source on GitHub ↗
(A)

Source from the content-addressed store, hash-verified

17
18
19def is_symmetric2(A):
20 rows, cols = A.shape
21 if rows != cols:
22 return False
23
24 for i in range(rows):
25 for j in range(cols):
26 if A[i,j] != A[j,i]:
27 return False
28
29 return True
30
31
32def check(A, b):

Callers 1

checkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected