(self, float_small, float_large)
| 338 | self.do_signed_overflow_bounds(np.longlong) |
| 339 | |
| 340 | def do_precision_lower_bound(self, float_small, float_large): |
| 341 | eps = np.finfo(float_large).eps |
| 342 | |
| 343 | arr = np.array([1.0], float_small) |
| 344 | range = np.array([1.0 + eps, 2.0], float_large) |
| 345 | |
| 346 | # test is looking for behavior when the bounds change between dtypes |
| 347 | if range.astype(float_small)[0] != 1: |
| 348 | return |
| 349 | |
| 350 | # previously crashed |
| 351 | count, x_loc = np.histogram(arr, bins=1, range=range) |
| 352 | assert_equal(count, [1]) |
| 353 | |
| 354 | # gh-10322 means that the type comes from arr - this may change |
| 355 | assert_equal(x_loc.dtype, float_small) |
| 356 | |
| 357 | def do_precision_upper_bound(self, float_small, float_large): |
| 358 | eps = np.finfo(float_large).eps |
no test coverage detected