(self)
| 747 | assert_raises(ValueError, diff, x) |
| 748 | |
| 749 | def test_nd(self): |
| 750 | x = 20 * rand(10, 20, 30) |
| 751 | out1 = x[:, :, 1:] - x[:, :, :-1] |
| 752 | out2 = out1[:, :, 1:] - out1[:, :, :-1] |
| 753 | out3 = x[1:, :, :] - x[:-1, :, :] |
| 754 | out4 = out3[1:, :, :] - out3[:-1, :, :] |
| 755 | assert_array_equal(diff(x), out1) |
| 756 | assert_array_equal(diff(x, n=2), out2) |
| 757 | assert_array_equal(diff(x, axis=0), out3) |
| 758 | assert_array_equal(diff(x, n=2, axis=0), out4) |
| 759 | |
| 760 | def test_n(self): |
| 761 | x = list(range(3)) |
nothing calls this directly
no test coverage detected