(self)
| 627 | class TestPtp: |
| 628 | |
| 629 | def test_basic(self): |
| 630 | a = np.array([3, 4, 5, 10, -3, -5, 6.0]) |
| 631 | assert_equal(a.ptp(axis=0), 15.0) |
| 632 | b = np.array([[3, 6.0, 9.0], |
| 633 | [4, 10.0, 5.0], |
| 634 | [8, 3.0, 2.0]]) |
| 635 | assert_equal(b.ptp(axis=0), [5.0, 7.0, 7.0]) |
| 636 | assert_equal(b.ptp(axis=-1), [6.0, 6.0, 6.0]) |
| 637 | |
| 638 | assert_equal(b.ptp(axis=0, keepdims=True), [[5.0, 7.0, 7.0]]) |
| 639 | assert_equal(b.ptp(axis=(0,1), keepdims=True), [[8.0]]) |
| 640 | |
| 641 | |
| 642 | class TestCumsum: |
nothing calls this directly
no test coverage detected