Exemplo n.º 1
0
class TestEigh(unittest.TestCase):
    def setUp(self):
        self.test_matrix = np.loadtxt(get_data_path('full_sym_matrix.txt'))
        self.eigh = Eigh()

    def test_svd(self):
        """
        Ensure eigenvalues and eigenvectors are returned.
        """
        eigenvectors, eigenvalues = self.eigh.run(self.test_matrix)

        self.assertEqual(eigenvectors.shape, (100, 100))
        self.assertEqual(eigenvalues.shape, (100, ))
Exemplo n.º 2
0
class TestEigh(unittest.TestCase):
    def setUp(self):
        self.test_matrix = np.loadtxt(get_data_path('full_sym_matrix.txt'))
        self.eigh = Eigh()

    def test_svd(self):
        """
        Ensure eigenvalues and eigenvectors are returned.
        """
        eigenvectors, eigenvalues = self.eigh.run(self.test_matrix)

        self.assertEqual(eigenvectors.shape, (100, 100))
        self.assertEqual(eigenvalues.shape, (100,))
Exemplo n.º 3
0
 def setUp(self):
     self.test_matrix = np.loadtxt(get_data_path('full_sym_matrix.txt'))
     self.eigh = Eigh()
Exemplo n.º 4
0
 def setUp(self):
     self.test_matrix = np.loadtxt(get_data_path('full_sym_matrix.txt'))
     self.eigh = Eigh()