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

Function test_safe_cast_nan_to_int_raises

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

Source from the content-addressed store, hash-verified

2010
2011@pytest.mark.numpy
2012def test_safe_cast_nan_to_int_raises():
2013 arr = pa.array([np.nan, 1.])
2014
2015 with pytest.raises(pa.ArrowInvalid, match='truncated'):
2016 arr.cast(pa.int64(), safe=True)
2017
2018
2019@pytest.mark.numpy

Callers

nothing calls this directly

Calls 2

arrayMethod · 0.45
castMethod · 0.45

Tested by

no test coverage detected