def test_mds_rosen(): # so the starting point is kind of cooked... n = 5 z = 0.9 * np.ones(n) stopit = (1e-12, np.inf, np.inf, 0, 1) x, fmax, nf = rogues.mdsmax(rosen, z, stopit) npt.assert_almost_equal(np.ones(n), x)
def test_mds_exp(): n = 5 z = np.ones(n) x, fmax, nf = rogues.mdsmax(exp_func, z) va = [] npt.assert_almost_equal(exp_func(np.zeros(n), va), exp_func(x, va))