Skip to content

Commit d76655d

Browse files
committed
Merge pull request #5791 from jreback/sparc_fix2
TST: aggregate_item_by_item test failure (GH5782)
2 parents 7b25572 + 521d20c commit d76655d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/tests/test_groupby.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,11 @@ def test_aggregate_item_by_item(self):
583583
foo = (self.df.A == 'foo').sum()
584584
bar = (self.df.A == 'bar').sum()
585585
K = len(result.columns)
586-
assert_almost_equal(result.xs('foo'), [foo] * K)
587-
assert_almost_equal(result.xs('bar'), [bar] * K)
586+
587+
# GH5782
588+
# odd comparisons can result here, so cast to make easy
589+
assert_almost_equal(result.xs('foo'), np.array([foo] * K).astype('float64'))
590+
assert_almost_equal(result.xs('bar'), np.array([bar] * K).astype('float64'))
588591

589592
def aggfun(ser):
590593
return ser.size

0 commit comments

Comments
 (0)