def test_partition_05(self): np.random.seed(42) matrix = np.random.uniform(-1, 1, 9).reshape(3, 3) ss = Subspaces(dim=4) ss.evects = matrix with self.assertRaises(ValueError): ss._partition()
def test_partition_02(self): np.random.seed(42) matrix = np.random.uniform(-1, 1, 9).reshape(3, 3) ss = Subspaces(dim=2) ss.evects = matrix ss._partition() np.testing.assert_array_almost_equal(matrix[:, 2:], ss.W2)