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

Function test_replace_with_mask_null_in_mask

python/pyarrow/tests/test_compute.py:1355–1362  ·  view source on GitHub ↗

Test null handling in mask.

()

Source from the content-addressed store, hash-verified

1353
1354
1355def test_replace_with_mask_null_in_mask():
1356 """Test null handling in mask."""
1357 arr = pa.array([1, 2, 3, 4, 5, 6])
1358 mask = pa.array([False, False, None, None, True, True])
1359 replacements = pa.array([10, None])
1360 expected = pa.array([1, 2, None, None, 10, None])
1361 result = pc.replace_with_mask(arr, mask, replacements)
1362 assert result.equals(expected)
1363
1364
1365def test_replace_with_mask_string_type():

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected