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

Function test_is_nan

python/pyarrow/tests/test_compute.py:2086–2100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2084
2085
2086def test_is_nan():
2087 arr = pa.array([1, 2, 3, None, float("nan")])
2088 result = arr.is_nan()
2089 expected = pa.array([False, False, False, None, True])
2090 assert result.equals(expected)
2091
2092 arr = pa.array(["1", "2", None], type=pa.string())
2093 with pytest.raises(
2094 ArrowNotImplementedError, match="has no kernel matching input types"):
2095 _ = arr.is_nan()
2096
2097 with pytest.raises(
2098 ArrowNotImplementedError, match="has no kernel matching input types"):
2099 arr = pa.array([b'a', b'bb', None], type=pa.large_binary())
2100 _ = arr.is_nan()
2101
2102
2103def test_fill_null():

Callers

nothing calls this directly

Calls 3

equalsMethod · 0.80
arrayMethod · 0.45
stringMethod · 0.45

Tested by

no test coverage detected