B = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) print("hand-built:", det(B), "\t numpy:", np.linalg.det(B)) # hand-built: 0 numpy: -9.5e-16 (essentially zero) __ __