Skip to content

DOC: np.quantile incorrectly displays the np.percentile docstring #29304

Closed
@inventshah

Description

@inventshah

Issue with current documentation:

In both VSCode and PyCharm, when hovering over np.quantile the IDE displays def percentile ... and the corresponding docstring. Although the function signatures are identical, qs range is not. Currently, IDEs tell developers q for np.quantile should be 0-100, which is not correct.

VSCode
Image

PyCharm
Image

Idea or request for content:

The cause appears to be at

# NOTE: Not an alias, but they do have identical signatures
# (that we can reuse)
quantile = percentile

The assignment tricks the IDE into thinking quantile is an alias for percentile so pulls the incorrect info. Would a PR that duplicates the percentile type stubs for quantile be accepted or is the added maintenance burden not worth it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions