(Poly)
| 493 | |
| 494 | |
| 495 | def test_linspace(Poly): |
| 496 | d = Poly.domain + random((2,)) * .25 |
| 497 | w = Poly.window + random((2,)) * .25 |
| 498 | p = Poly([1, 2, 3], domain=d, window=w) |
| 499 | # check default domain |
| 500 | xtgt = np.linspace(d[0], d[1], 20) |
| 501 | ytgt = p(xtgt) |
| 502 | xres, yres = p.linspace(20) |
| 503 | assert_almost_equal(xres, xtgt) |
| 504 | assert_almost_equal(yres, ytgt) |
| 505 | # check specified domain |
| 506 | xtgt = np.linspace(0, 2, 20) |
| 507 | ytgt = p(xtgt) |
| 508 | xres, yres = p.linspace(20, domain=[0, 2]) |
| 509 | assert_almost_equal(xres, xtgt) |
| 510 | assert_almost_equal(yres, ytgt) |
| 511 | |
| 512 | |
| 513 | def test_pow(Poly): |
nothing calls this directly
no test coverage detected
searching dependent graphs…