(self)
| 1155 | # assert_raises(TypeError, gradient, x, axis=[1,]) |
| 1156 | |
| 1157 | def test_timedelta64(self): |
| 1158 | # Make sure gradient() can handle special types like timedelta64 |
| 1159 | x = np.array( |
| 1160 | [-5, -3, 10, 12, 61, 321, 300], |
| 1161 | dtype='timedelta64[D]') |
| 1162 | dx = np.array( |
| 1163 | [2, 7, 7, 25, 154, 119, -21], |
| 1164 | dtype='timedelta64[D]') |
| 1165 | assert_array_equal(gradient(x), dx) |
| 1166 | assert_(dx.dtype == np.dtype('timedelta64[D]')) |
| 1167 | |
| 1168 | def test_inexact_dtypes(self): |
| 1169 | for dt in [np.float16, np.float32, np.float64]: |
nothing calls this directly
no test coverage detected