class documentation

class TestHalf:

View In Hierarchy

Undocumented

Method setup Undocumented
Method test​_half​_array​_interface Test that half is compatible with __array_interface__
Method test​_half​_coercion Test that half gets coerced properly with the other types
Method test​_half​_conversion​_denormal​_round​_even Undocumented
Method test​_half​_conversion​_from​_string Undocumented
Method test​_half​_conversion​_rounding Undocumented
Method test​_half​_conversion​_to​_string Undocumented
Method test​_half​_conversions Checks that all 16-bit values survive conversion to/from 32-bit and 64-bit float
Method test​_half​_correctness Take every finite float16, and check the casting functions with a manual conversion.
Method test​_half​_fpe Undocumented
Method test​_half​_funcs Test the various ArrFuncs
Method test​_half​_ordering Make sure comparisons are working right
Method test​_half​_rounding Checks that rounding when converting to half is correct
Method test​_half​_ufuncs Test the various ufuncs
Method test​_half​_values Confirms a small number of known half values
Method test​_nans​_infs Undocumented
Method test​_spacing​_nextafter Test np.spacing and np.nextafter
Instance Variable all​_f16 Undocumented
Instance Variable all​_f32 Undocumented
Instance Variable all​_f64 Undocumented
Instance Variable finite​_f16 Undocumented
Instance Variable finite​_f32 Undocumented
Instance Variable finite​_f64 Undocumented
Instance Variable nonan​_f16 Undocumented
Instance Variable nonan​_f32 Undocumented
Instance Variable nonan​_f64 Undocumented
def setup(self):

Undocumented

def test_half_array_interface(self):
Test that half is compatible with __array_interface__
def test_half_coercion(self):
Test that half gets coerced properly with the other types
@pytest.mark.parametrize(['float_t', 'uint_t', 'bits'], [(np.float32, np.uint32, 23), (np.float64, np.uint64, 52)])
def test_half_conversion_denormal_round_even(self, float_t, uint_t, bits):

Undocumented

@pytest.mark.parametrize('string_dt', ['S', 'U'])
def test_half_conversion_from_string(self, string_dt):

Undocumented

@pytest.mark.parametrize('offset', [None, 'up', 'down'])
@pytest.mark.parametrize('shift', [None, 'up', 'down'])
@pytest.mark.parametrize('float_t', [np.float32, np.float64])
def test_half_conversion_rounding(self, float_t, shift, offset):

Undocumented

@pytest.mark.parametrize('string_dt', ['S', 'U'])
def test_half_conversion_to_string(self, string_dt):

Undocumented

def test_half_conversions(self):
Checks that all 16-bit values survive conversion to/from 32-bit and 64-bit float
def test_half_correctness(self):
Take every finite float16, and check the casting functions with a manual conversion.
@pytest.mark.skipif((platform.machine() == 'armv5tel'), reason='See gh-413.')
def test_half_fpe(self):

Undocumented

def test_half_funcs(self):
Test the various ArrFuncs
def test_half_ordering(self):
Make sure comparisons are working right
def test_half_rounding(self):
Checks that rounding when converting to half is correct
def test_half_ufuncs(self):
Test the various ufuncs
def test_half_values(self):
Confirms a small number of known half values
def test_nans_infs(self):

Undocumented

def test_spacing_nextafter(self):
Test np.spacing and np.nextafter
all_f16 =

Undocumented

all_f32 =

Undocumented

all_f64 =

Undocumented

finite_f16 =

Undocumented

finite_f32 =

Undocumented

finite_f64 =

Undocumented

nonan_f16 =

Undocumented

nonan_f32 =

Undocumented

nonan_f64 =

Undocumented