def testSorting(self):
        x = generate_covsig(np.diag([1, 9, 2, 6, 3, 8, 4, 5, 7]), 500)
        w, v = pca(x, sort_components=True)
        c = np.cov(np.dot(w.T, x))
        self.assertTrue(np.allclose(c, np.diag([9, 8, 7, 6, 5, 4, 3, 2, 1]), rtol=1e-1, atol=1e-2))
        w, v = pca(x, sort_components=True)
        c = np.cov(np.dot(w.T, x))
        self.assertTrue(np.allclose(c, np.diag([9, 8, 7, 6, 5, 4, 3, 2, 1]), rtol=1e-1, atol=1e-2))
This will run the code, but what is a good test for canny?
dataset/ETHPy150Open scot-dev/scot/scot/tests/test_pca.py/TestFunctionality.testSorting--crossover with--dataset/ETHPy150Open bolme/pyvision/src/pyvision/edge/canny.py/_TestCanny.test_canny5