Skip to content

ENH,DOC: Updates related to allowing where= in mean, std, and var #17894

Description

@seberg

@sgasse maybe you want to have a look at it. I had not realized that gh-15852 added these arguments to the method, but we forgot to also modify the documentation of np.ndarray.mean (i.e. the array attribute/method), which should be in _add_newdocs.py.

Also we use now in mean and var:

umr_any(ddof >= rcount, axis=None)

instead of just ddof >= rcount. This is fairly slow (about 30% of the call-time for tiny arrays). Just as all of the rest of the code, it should probably be ddof >= rcount if where is True else umr_any(ddof >= rcount, axis=None) to avoid most of the new overhead incurred by gh-15852.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions