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:1838–1848  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1836
1837@pytest.mark.numpy
1838def test_floating_point_truncate_safe():
1839 safe_cases = [
1840 (np.array([1.0, 2.0, 3.0], dtype='float32'), 'float32',
1841 np.array([1, 2, 3], dtype='i4'), pa.int32()),
1842 (np.array([1.0, 2.0, 3.0], dtype='float64'), 'float64',
1843 np.array([1, 2, 3], dtype='i4'), pa.int32()),
1844 (np.array([-10.0, 20.0, -30.0], dtype='float64'), 'float64',
1845 np.array([-10, 20, -30], dtype='i4'), pa.int32()),
1846 ]
1847 for case in safe_cases:
1848 _check_cast_case(case, safe=True)
1849
1850
1851@pytest.mark.numpy

Callers

nothing calls this directly

Calls 2

_check_cast_caseFunction · 0.85
arrayMethod · 0.45

Tested by

no test coverage detected