(self)
| 1296 | # assert_raises(TypeError, gradient, x, axis=[1,]) |
| 1297 | |
| 1298 | def test_timedelta64(self): |
| 1299 | # Make sure gradient() can handle special types like timedelta64 |
| 1300 | x = np.array( |
| 1301 | [-5, -3, 10, 12, 61, 321, 300], |
| 1302 | dtype='timedelta64[D]') |
| 1303 | dx = np.array( |
| 1304 | [2, 7, 7, 25, 154, 119, -21], |
| 1305 | dtype='timedelta64[D]') |
| 1306 | assert_array_equal(gradient(x), dx) |
| 1307 | assert_(dx.dtype == np.dtype('timedelta64[D]')) |
| 1308 | |
| 1309 | def test_inexact_dtypes(self): |
| 1310 | for dt in [np.float16, np.float32, np.float64]: |
nothing calls this directly
no test coverage detected