Skip to content

Commit 5fd4de7

Browse files
committed
Adding test to array_ops, pandas-dev#37348
1 parent 075ec87 commit 5fd4de7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pandas/tests/arithmetic/test_array_ops.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44
import pytest
55

66
import pandas._testing as tm
7+
8+
from pandas import DataFrame
79
from pandas.core.ops.array_ops import (
810
comparison_op,
911
na_logical_op,
1012
)
13+
from pandas.core.computation.expressions import (
14+
_evaluate_numexpr,
15+
_evaluate_standard,
16+
)
1117

1218

1319
def test_na_logical_op_2d():
@@ -37,3 +43,13 @@ def test_object_comparison_2d():
3743
right.flags.writeable = False
3844
result = comparison_op(left, right, operator.ne)
3945
tm.assert_numpy_array_equal(result, ~expected)
46+
47+
48+
def test_str_comparison():
49+
a = np.array(range(10 ** 5))
50+
right = DataFrame(a, dtype=np.int64)
51+
left = " "
52+
53+
result = right == left
54+
expected = DataFrame(np.zeros(right.shape, dtype=bool))
55+
tm.assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)