(self)
| 532 | |
| 533 | class TestVander: |
| 534 | def test_basic(self): |
| 535 | c = np.array([0, 1, -2, 3]) |
| 536 | v = vander(c) |
| 537 | powers = np.array([[0, 0, 0, 0, 1], |
| 538 | [1, 1, 1, 1, 1], |
| 539 | [16, -8, 4, -2, 1], |
| 540 | [81, 27, 9, 3, 1]]) |
| 541 | # Check default value of N: |
| 542 | assert_array_equal(v, powers[:, 1:]) |
| 543 | # Check a range of N values, including 0 and 5 (greater than default) |
| 544 | m = powers.shape[1] |
| 545 | for n in range(6): |
| 546 | v = vander(c, N=n) |
| 547 | assert_array_equal(v, powers[:, m - n:m]) |
| 548 | |
| 549 | def test_dtypes(self): |
| 550 | c = array([11, -12, 13], dtype=np.int8) |
nothing calls this directly
no test coverage detected