@@ -22,7 +22,7 @@ def setup_method(self):
22
22
self .all_f16 = np .arange (0x10000 , dtype = uint16 )
23
23
self .all_f16 .dtype = float16
24
24
25
- # NaN value can cause an invalid FP exception if HW is been used
25
+ # NaN value can cause an invalid FP exception if HW is being used
26
26
with np .errstate (invalid = 'ignore' ):
27
27
self .all_f32 = np .array (self .all_f16 , dtype = float32 )
28
28
self .all_f64 = np .array (self .all_f16 , dtype = float64 )
@@ -49,7 +49,7 @@ def test_half_conversions(self):
49
49
# Convert from float32 back to float16
50
50
with np .errstate (invalid = 'ignore' ):
51
51
b = np .array (self .all_f32 , dtype = float16 )
52
- # avoid testing NaNs due to differ bits wither Q/SNaNs
52
+ # avoid testing NaNs due to differing bit patterns in Q/S NaNs
53
53
b_nn = b == b
54
54
assert_equal (self .all_f16 [b_nn ].view (dtype = uint16 ),
55
55
b [b_nn ].view (dtype = uint16 ))
@@ -119,8 +119,8 @@ def test_half_conversion_rounding(self, float_t, shift, offset):
119
119
# Convert back to float16 and its bit pattern:
120
120
res_patterns = f16s_float .astype (np .float16 ).view (np .uint16 )
121
121
122
- # The above calculations tries the original values, or the exact
123
- # mid points between the float16 values. It then further offsets them
122
+ # The above calculation tries the original values, or the exact
123
+ # midpoints between the float16 values. It then further offsets them
124
124
# by as little as possible. If no offset occurs, "round to even"
125
125
# logic will be necessary, an arbitrarily small offset should cause
126
126
# normal up/down rounding always.
0 commit comments