def test_get_labels_eigen(self): a = CoulombMatrix(eigen=True) X = a.fit_transform([METHANE]) labels = a.get_labels() self.assertEqual(X.shape[1], len(labels)) expected = ('coul-0', 'coul-1', 'coul-2', 'coul-3', 'coul-4') self.assertEqual(labels, expected)
def test_get_labels(self): a = CoulombMatrix() X = a.fit_transform([METHANE]) labels = a.get_labels() self.assertEqual(X.shape[1], len(labels)) expected = ( 'coul-0-0', 'coul-0-1', 'coul-0-2', 'coul-0-3', 'coul-0-4', 'coul-1-0', 'coul-1-1', 'coul-1-2', 'coul-1-3', 'coul-1-4', 'coul-2-0', 'coul-2-1', 'coul-2-2', 'coul-2-3', 'coul-2-4', 'coul-3-0', 'coul-3-1', 'coul-3-2', 'coul-3-3', 'coul-3-4', 'coul-4-0', 'coul-4-1', 'coul-4-2', 'coul-4-3', 'coul-4-4', ) self.assertEqual(labels, expected)