(self)
| 882 | assert_raises(ValueError, diff, x) |
| 883 | |
| 884 | def test_nd(self): |
| 885 | x = 20 * rand(10, 20, 30) |
| 886 | out1 = x[:, :, 1:] - x[:, :, :-1] |
| 887 | out2 = out1[:, :, 1:] - out1[:, :, :-1] |
| 888 | out3 = x[1:, :, :] - x[:-1, :, :] |
| 889 | out4 = out3[1:, :, :] - out3[:-1, :, :] |
| 890 | assert_array_equal(diff(x), out1) |
| 891 | assert_array_equal(diff(x, n=2), out2) |
| 892 | assert_array_equal(diff(x, axis=0), out3) |
| 893 | assert_array_equal(diff(x, n=2, axis=0), out4) |
| 894 | |
| 895 | def test_n(self): |
| 896 | x = list(range(3)) |
nothing calls this directly
no test coverage detected