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

Function test_sequence_numpy_integer

python/pyarrow/tests/test_convert_builtin.py:425–435  ·  view source on GitHub ↗
(seq, np_scalar_pa_type)

Source from the content-addressed store, hash-verified

423@parametrize_with_sequence_types
424@pytest.mark.parametrize("np_scalar_pa_type", int_type_pairs)
425def test_sequence_numpy_integer(seq, np_scalar_pa_type):
426 np_str_scalar, pa_type = np_scalar_pa_type
427 np_scalar = getattr(np, np_str_scalar)
428 expected = [np_scalar(1), None, np_scalar(3), None,
429 np_scalar(np.iinfo(np_scalar).min),
430 np_scalar(np.iinfo(np_scalar).max)]
431 arr = pa.array(seq(expected), type=pa_type)
432 assert len(arr) == 6
433 assert arr.null_count == 2
434 assert arr.type == pa_type
435 assert arr.to_pylist() == expected
436
437
438@pytest.mark.numpy

Callers

nothing calls this directly

Calls 2

lenFunction · 0.85
arrayMethod · 0.45

Tested by

no test coverage detected