Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Inconsistent return type in statistics.median_grouped() #92531

Closed
Labels
3.11only security fixestype-bugAn unexpected behavior, bug, or error
@rhettinger

Description

@rhettinger

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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp