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

Function test_array_from_masked

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

Source from the content-addressed store, hash-verified

3086
3087@pytest.mark.numpy
3088def test_array_from_masked():
3089 ma = np.ma.array([1, 2, 3, 4], dtype='int64',
3090 mask=[False, False, True, False])
3091 result = pa.array(ma)
3092 expected = pa.array([1, 2, None, 4], type='int64')
3093 assert expected.equals(result)
3094
3095 with pytest.raises(ValueError, match="Cannot pass a numpy masked array"):
3096 pa.array(ma, mask=np.array([True, False, False, False]))
3097
3098
3099@pytest.mark.numpy

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected