(self, float_small, float_large)
| 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 |
| 359 | |
| 360 | arr = np.array([1.0], float_small) |
| 361 | range = np.array([0.0, 1.0 - eps], float_large) |
| 362 | |
| 363 | # test is looking for behavior when the bounds change between dtypes |
| 364 | if range.astype(float_small)[-1] != 1: |
| 365 | return |
| 366 | |
| 367 | # previously crashed |
| 368 | count, x_loc = np.histogram(arr, bins=1, range=range) |
| 369 | assert_equal(count, [1]) |
| 370 | |
| 371 | # gh-10322 means that the type comes from arr - this may change |
| 372 | assert_equal(x_loc.dtype, float_small) |
| 373 | |
| 374 | def do_precision(self, float_small, float_large): |
| 375 | self.do_precision_lower_bound(float_small, float_large) |
no test coverage detected