module documentation

Undocumented

Constant LD​_INFO Undocumented
Variable longdouble​_longer​_than​_double Undocumented
Variable repr​_precision Undocumented
Variable string​_to​_longdouble​_inaccurate Undocumented
Class ​Test​Comma​Decimal​Point​Locale Undocumented
Class ​Test​File​Based Undocumented
Function test​_array​_and​_stringlike​_roundtrip Test that string representations of long-double roundtrip both for array casting and scalar coercion, see also gh-15608.
Function test​_array​_repr Undocumented
Function test​_bogus​_string Undocumented
Function test​_format Undocumented
Function test​_fromstring Undocumented
Function test​_fromstring​_bogus Undocumented
Function test​_fromstring​_complex Undocumented
Function test​_fromstring​_empty Undocumented
Function test​_fromstring​_missing Undocumented
Function test​_longdouble​_from​_bool Undocumented
Function test​_longdouble​_from​_int Undocumented
Function test​_percent Undocumented
Function test​_repr​_exact Undocumented
Function test​_repr​_roundtrip Undocumented
Function test​_repr​_roundtrip​_bytes Undocumented
Function test​_scalar​_extraction Confirm that extracting a value doesn't convert to python float
Variable ​_o Undocumented
LD_INFO =

Undocumented

Value
np.finfo(np.longdouble)
longdouble_longer_than_double =

Undocumented

repr_precision =

Undocumented

string_to_longdouble_inaccurate =

Undocumented

@pytest.mark.skipif(string_to_longdouble_inaccurate, reason='Need strtold_l')
@pytest.mark.parametrize('strtype', (np.str_, np.bytes_, str, bytes))
def test_array_and_stringlike_roundtrip(strtype):
Test that string representations of long-double roundtrip both for array casting and scalar coercion, see also gh-15608.
@pytest.mark.skipif(longdouble_longer_than_double, reason='array repr problem')
@pytest.mark.skipif(string_to_longdouble_inaccurate, reason='Need strtold_l')
def test_array_repr():

Undocumented

def test_bogus_string():

Undocumented

@pytest.mark.skipif(longdouble_longer_than_double, reason='BUG #2376')
@pytest.mark.skipif(string_to_longdouble_inaccurate, reason='Need strtold_l')
def test_format():

Undocumented

@pytest.mark.skipif(string_to_longdouble_inaccurate, reason='Need strtold_l')
def test_fromstring():

Undocumented

def test_fromstring_bogus():

Undocumented

def test_fromstring_complex():

Undocumented

def test_fromstring_empty():

Undocumented

def test_fromstring_missing():

Undocumented

@pytest.mark.parametrize('bool_val', [True, False])
def test_longdouble_from_bool(bool_val):

Undocumented

@pytest.mark.parametrize('int_val', [2**1024, 0])
def test_longdouble_from_int(int_val):

Undocumented

@pytest.mark.skipif(longdouble_longer_than_double, reason='BUG #2376')
@pytest.mark.skipif(string_to_longdouble_inaccurate, reason='Need strtold_l')
def test_percent():

Undocumented

def test_repr_exact():

Undocumented

@pytest.mark.skipif((LD_INFO.precision + 2 >= repr_precision), reason='repr precision not enough to show eps')
def test_repr_roundtrip():

Undocumented

@pytest.mark.skipif(string_to_longdouble_inaccurate, reason='Need strtold_l')
def test_repr_roundtrip_bytes():

Undocumented

def test_scalar_extraction():
Confirm that extracting a value doesn't convert to python float
_o =

Undocumented