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

Function test_arithmetic_remainder_modulo

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

Source from the content-addressed store, hash-verified

1950
1951
1952def test_arithmetic_remainder_modulo():
1953 left = pa.array([7, -7, 7, -7, None])
1954 right = pa.array([3, 3, -3, -3, 3])
1955 expected_remainder = [1, -1, 1, -1, None]
1956 expected_modulo = [1, 2, -2, -1, None]
1957
1958 assert pc.remainder(left, right).to_pylist() == expected_remainder
1959 assert pc.remainder_checked(left, right).to_pylist() == expected_remainder
1960 assert pc.modulo(left, right).to_pylist() == expected_modulo
1961 assert pc.modulo_checked(left, right).to_pylist() == expected_modulo
1962
1963
1964@pytest.mark.parametrize("ty", ["round", "round_to_multiple"])

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected