-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Labels
3.11only security fixesonly security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
The median_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')
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error