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