()
| 1836 | |
| 1837 | @pytest.mark.numpy |
| 1838 | def 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 |
nothing calls this directly
no test coverage detected