MCPcopy Create free account
hub / github.com/apache/arrow / test_floating_point_truncate_safe

Function test_floating_point_truncate_safe

python/pyarrow/tests/test_array.py:1723–1733  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1721
1722@pytest.mark.numpy
1723def test_floating_point_truncate_safe():
1724 safe_cases = [
1725 (np.array([1.0, 2.0, 3.0], dtype='float32'), 'float32',
1726 np.array([1, 2, 3], dtype='i4'), pa.int32()),
1727 (np.array([1.0, 2.0, 3.0], dtype='float64'), 'float64',
1728 np.array([1, 2, 3], dtype='i4'), pa.int32()),
1729 (np.array([-10.0, 20.0, -30.0], dtype='float64'), 'float64',
1730 np.array([-10, 20, -30], dtype='i4'), pa.int32()),
1731 ]
1732 for case in safe_cases:
1733 _check_cast_case(case, safe=True)
1734
1735
1736@pytest.mark.numpy

Callers

nothing calls this directly

Calls 2

_check_cast_caseFunction · 0.85
arrayMethod · 0.45

Tested by

no test coverage detected