Skip to content

Commit 775c2ef

Browse files
committed
fixup
1 parent 9be1dff commit 775c2ef

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

pandas/tests/series/test_ufunc.py

+9-10
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
]
1919
SPARSE_IDS = ['sparse', 'dense']
2020
SHUFFLE = [
21-
pytest.param(True, marks=pytest.mark.xfail(reason="GH-26945")),
21+
pytest.param(True, marks=pytest.mark.xfail(reason="GH-26945",
22+
strict=False)),
2223
False
2324
]
2425

@@ -79,17 +80,15 @@ def test_binary_ufunc(ufunc, sparse, shuffle, box_other,
7980
else:
8081
s2 = a2
8182

82-
# handle shufling / alignment
83-
# If boxing -- ufunc(series, series) -- then we don't need to shuffle
84-
# the other array for the expected, since we align.
85-
# If not boxing -- ufunc(series, array) -- then we do need to shuffle
86-
# the other array, since we *dont'* align
8783
idx = np.random.permutation(len(s1))
88-
if box_other and shuffle:
89-
# ensure we align before applying the ufunc
84+
85+
if shuffle:
9086
s2 = s2.take(idx)
91-
elif shuffle:
92-
a2 = a2.take(idx)
87+
if box_other != 'series':
88+
# when other is a Series, we align, so we don't
89+
# need to shuffle the array for expected. In all
90+
# other cases, we do.
91+
a2 = a2.take(idx)
9392

9493
a, b = s1, s2
9594
c, d = a1, a2

0 commit comments

Comments
 (0)