Did I find the right examples for you? yes no

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/m/i/MissionPlanner-HEAD/Lib/site-packages/numpy/polynomial/tests/test_polynomial.py   MissionPlanner(Download)
 
        # test default value of domain
        p = poly.Polynomial.fit(x, y, 3)
        assert_almost_equal(p.domain, [0,3])
 
        # test that fit works in given domains
        p = poly.Polynomial.fit(x, y, 3, None)
        assert_almost_equal(p(x), y)
        assert_almost_equal(p.domain, [0,3])
        p = poly.Polynomial.fit(x, y, 3, [])
        w[1::2] = 1
        yw[0::2] = 0
        p = poly.Polynomial.fit(x, yw, 3, w=w)
        assert_almost_equal(p(x), y)
 

src/s/p/Spherebot-Host-GUI-HEAD/InkscapePortable/App/Inkscape/python/Lib/site-packages/numpy/polynomial/tests/test_polynomial.py   Spherebot-Host-GUI(Download)
        x = np.linspace(0,3)
        y = f(x)
        p = poly.Polynomial.fit(x, y, 3)
        assert_almost_equal(p(x), y)
        p = poly.Polynomial.fit(x, y, 3, None)