/usr/local/lib64/python3.6/site-packages/pandas/tests/arithmetic
NameSizeModeActions
__pycache__/-0755rm
common.py29150644editdlrm
conftest.py59810644editdlrm
test_array_ops.py10510644editdlrm
test_datetime64.py900890644editdlrm
test_interval.py103060644editdlrm
test_numeric.py474400644editdlrm
test_object.py121570644editdlrm
test_period.py564400644editdlrm
test_timedelta64.py779000644editdlrm
__init__.py00644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/pandas/tests/arithmetic/test_array_ops.py (1051B)
import operator import numpy as np import pytest import pandas._testing as tm from pandas.core.ops.array_ops import comparison_op, na_logical_op def test_na_logical_op_2d(): left = np.arange(8).reshape(4, 2) right = left.astype(object) right[0, 0] = np.nan # Check that we fall back to the vec_binop branch with pytest.raises(TypeError, match="unsupported operand type"): operator.or_(left, right) result = na_logical_op(left, right, operator.or_) expected = right tm.assert_numpy_array_equal(result, expected) def test_object_comparison_2d(): left = np.arange(9).reshape(3, 3).astype(object) right = left.T result = comparison_op(left, right, operator.eq) expected = np.eye(3).astype(bool) tm.assert_numpy_array_equal(result, expected) # Ensure that cython doesn't raise on non-writeable arg, which # we can get from np.broadcast_to right.flags.writeable = False result = comparison_op(left, right, operator.ne) tm.assert_numpy_array_equal(result, ~expected)