(self)
| 731 | class TestPtp: |
| 732 | |
| 733 | def test_basic(self): |
| 734 | a = np.array([3, 4, 5, 10, -3, -5, 6.0]) |
| 735 | assert_equal(np.ptp(a, axis=0), 15.0) |
| 736 | b = np.array([[3, 6.0, 9.0], |
| 737 | [4, 10.0, 5.0], |
| 738 | [8, 3.0, 2.0]]) |
| 739 | assert_equal(np.ptp(b, axis=0), [5.0, 7.0, 7.0]) |
| 740 | assert_equal(np.ptp(b, axis=-1), [6.0, 6.0, 6.0]) |
| 741 | |
| 742 | assert_equal(np.ptp(b, axis=0, keepdims=True), [[5.0, 7.0, 7.0]]) |
| 743 | assert_equal(np.ptp(b, axis=(0, 1), keepdims=True), [[8.0]]) |
| 744 | |
| 745 | |
| 746 | class TestCumsum: |
nothing calls this directly
no test coverage detected