(self)
| 19 | |
| 20 | class TestHalf: |
| 21 | def _create_arrays_all(self): |
| 22 | # An array of all possible float16 values |
| 23 | all_f16 = np.arange(0x10000, dtype=uint16) |
| 24 | all_f16 = all_f16.view(float16) |
| 25 | |
| 26 | # NaN value can cause an invalid FP exception if HW is being used |
| 27 | with np.errstate(invalid='ignore'): |
| 28 | all_f32 = np.array(all_f16, dtype=float32) |
| 29 | all_f64 = np.array(all_f16, dtype=float64) |
| 30 | return all_f16, all_f32, all_f64 |
| 31 | |
| 32 | def _create_arrays_nonan(self): |
| 33 | # An array of all non-NaN float16 values, in sorted order |
no test coverage detected