(t)
| 4471 | assert_equal(np.nextafter(t(0), t(direction)) / t(2.1), direction * 0.0) |
| 4472 | |
| 4473 | def _test_spacing(t): |
| 4474 | one = t(1) |
| 4475 | eps = np.finfo(t).eps |
| 4476 | nan = t(np.nan) |
| 4477 | inf = t(np.inf) |
| 4478 | with np.errstate(invalid='ignore'): |
| 4479 | assert_equal(np.spacing(one), eps) |
| 4480 | assert_(np.isnan(np.spacing(nan))) |
| 4481 | assert_(np.isnan(np.spacing(inf))) |
| 4482 | assert_(np.isnan(np.spacing(-inf))) |
| 4483 | assert_(np.spacing(t(1e30)) != 0) |
| 4484 | |
| 4485 | def test_spacing(): |
| 4486 | return _test_spacing(np.float64) |
no test coverage detected