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

Function test_replace_with_mask_null_in_array

python/pyarrow/tests/test_compute.py:1345–1352  ·  view source on GitHub ↗

Test null handling in input array.

()

Source from the content-addressed store, hash-verified

1343
1344
1345def test_replace_with_mask_null_in_array():
1346 """Test null handling in input array."""
1347 arr = pa.array([1, None, 3, None, 5])
1348 mask = pa.array([False, True, False, True, True])
1349 replacements = pa.array([10, 20, 30])
1350 expected = pa.array([1, 10, 3, 20, 30])
1351 result = pc.replace_with_mask(arr, mask, replacements)
1352 assert result.equals(expected)
1353
1354
1355def test_replace_with_mask_null_in_mask():

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected