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

Function test_sequence_integer_np_nan

python/pyarrow/tests/test_convert_builtin.py:381–392  ·  view source on GitHub ↗
(seq, pa_type)

Source from the content-addressed store, hash-verified

379@parametrize_with_collections_types
380@pytest.mark.parametrize("pa_type", pa_int_types)
381def test_sequence_integer_np_nan(seq, pa_type):
382 # ARROW-2806: numpy.nan is a double value and thus should produce
383 # a double array.
384 with pytest.raises(ValueError):
385 pa.array(seq([np.nan]), type=pa_type, from_pandas=False)
386
387 arr = pa.array(seq([np.nan]), type=pa_type, from_pandas=True)
388 expected = [None]
389 assert len(arr) == 1
390 assert arr.null_count == 1
391 assert arr.type == pa_type
392 assert arr.to_pylist() == expected
393
394
395@pytest.mark.numpy

Callers

nothing calls this directly

Calls 2

lenFunction · 0.85
arrayMethod · 0.45

Tested by

no test coverage detected