Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Themedian_grouped() function erroneously returns inconsistent types in its special case path for a single argument. The function should always return a float.
>>> median_grouped([Fraction(2, 3), Fraction(3, 5)])0.16666666666666663>>>median_grouped([Fraction(2, 3)])Fraction(2, 3)>>> median_grouped([Decimal(5.5), Decimal(2.5)])5.0>>> median_grouped([Decimal(5.5)])Decimal('5.5')