@@ -22,7 +22,7 @@ def setup_method(self):
2222 self .all_f16 = np .arange (0x10000 , dtype = uint16 )
2323 self .all_f16 .dtype = float16
2424
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
2626 with np .errstate (invalid = 'ignore' ):
2727 self .all_f32 = np .array (self .all_f16 , dtype = float32 )
2828 self .all_f64 = np .array (self .all_f16 , dtype = float64 )
@@ -49,7 +49,7 @@ def test_half_conversions(self):
4949 # Convert from float32 back to float16
5050 with np .errstate (invalid = 'ignore' ):
5151 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
5353 b_nn = b == b
5454 assert_equal (self .all_f16 [b_nn ].view (dtype = uint16 ),
5555 b [b_nn ].view (dtype = uint16 ))
@@ -119,8 +119,8 @@ def test_half_conversion_rounding(self, float_t, shift, offset):
119119 # Convert back to float16 and its bit pattern:
120120 res_patterns = f16s_float .astype (np .float16 ).view (np .uint16 )
121121
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
124124 # by as little as possible. If no offset occurs, "round to even"
125125 # logic will be necessary, an arbitrarily small offset should cause
126126 # normal up/down rounding always.
0 commit comments