We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7b25572 + 521d20c commit d76655dCopy full SHA for d76655d
pandas/tests/test_groupby.py
@@ -583,8 +583,11 @@ def test_aggregate_item_by_item(self):
583
foo = (self.df.A == 'foo').sum()
584
bar = (self.df.A == 'bar').sum()
585
K = len(result.columns)
586
- assert_almost_equal(result.xs('foo'), [foo] * K)
587
- assert_almost_equal(result.xs('bar'), [bar] * K)
+
+ # 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'))
591
592
def aggfun(ser):
593
return ser.size
0 commit comments