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

Function test_array_string_from_all_null

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

Source from the content-addressed store, hash-verified

3071
3072@pytest.mark.numpy
3073def test_array_string_from_all_null():
3074 # ARROW-5682
3075 vals = np.array([None, None], dtype=object)
3076 arr = pa.array(vals, type=pa.string())
3077 assert arr.null_count == 2
3078
3079 vals = np.array([np.nan, np.nan], dtype='float64')
3080 # by default raises, but accept as all-null when from_pandas=True
3081 with pytest.raises(TypeError):
3082 pa.array(vals, type=pa.string())
3083 arr = pa.array(vals, type=pa.string(), from_pandas=True)
3084 assert arr.null_count == 2
3085
3086
3087@pytest.mark.numpy

Callers

nothing calls this directly

Calls 2

arrayMethod · 0.45
stringMethod · 0.45

Tested by

no test coverage detected