def test_misc(): X = np.random.standard_normal((40, 5)) power_L(X) Xa = rr.astransform(X) np.testing.assert_allclose(todense(Xa), X) reshapeA = adjoint(reshape((30, ), (6, 5))) assert_raises(NotImplementedError, todense, reshapeA)
def test_misc(): X = np.random.standard_normal((40, 5)) power_L(X) Xa = rr.astransform(X) np.testing.assert_allclose(todense(Xa), X) reshapeA = adjoint(reshape((30,), (6,5))) assert_raises(NotImplementedError, todense, reshapeA)
def test_reshape(): reshape_ = reshape((30, ), (6, 5)) assert_equal(reshape_.linear_map(np.arange(30)).shape, (6, 5)) assert_equal(reshape_.affine_map(np.arange(30)).shape, (6, 5)) assert_equal(reshape_.adjoint_map(np.zeros((6, 5))).shape, (30, ))
def test_reshape(): reshape_ = reshape((30,), (6,5)) assert_equal(reshape_.linear_map(np.arange(30)).shape, (6,5)) assert_equal(reshape_.affine_map(np.arange(30)).shape, (6,5)) assert_equal(reshape_.adjoint_map(np.zeros((6,5))).shape, (30,))