(Poly)
| 475 | |
| 476 | |
| 477 | def test_linspace(Poly): |
| 478 | d = Poly.domain + random((2,))*.25 |
| 479 | w = Poly.window + random((2,))*.25 |
| 480 | p = Poly([1, 2, 3], domain=d, window=w) |
| 481 | # check default domain |
| 482 | xtgt = np.linspace(d[0], d[1], 20) |
| 483 | ytgt = p(xtgt) |
| 484 | xres, yres = p.linspace(20) |
| 485 | assert_almost_equal(xres, xtgt) |
| 486 | assert_almost_equal(yres, ytgt) |
| 487 | # check specified domain |
| 488 | xtgt = np.linspace(0, 2, 20) |
| 489 | ytgt = p(xtgt) |
| 490 | xres, yres = p.linspace(20, domain=[0, 2]) |
| 491 | assert_almost_equal(xres, xtgt) |
| 492 | assert_almost_equal(yres, ytgt) |
| 493 | |
| 494 | |
| 495 | def test_pow(Poly): |
nothing calls this directly
no test coverage detected