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