Skip to content

Conversation

@MarcoGorelli
Copy link
Member

closes #29384

@MarcoGorelli MarcoGorelli changed the title DOC: document mean parameter in ndarray.std and ndarray.var DOC: document mean parameter in ndarray.std and ndarray.var docstring signatures Jul 16, 2025
add_newdoc('numpy._core.multiarray', 'ndarray', ('std',
"""
a.std(axis=None, dtype=None, out=None, ddof=0, keepdims=False, *, where=True)
a.std(axis=None, dtype=None, out=None, ddof=0, keepdims=False, *, where=True, mean=np._NoValue)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np.ndarray.std directly forwards the call to np.std, so I think you're right

static PyObject *
array_stddev(PyArrayObject *self,
PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
{
NPY_FORWARD_NDARRAY_METHOD(_std);
}

@MarcoGorelli MarcoGorelli marked this pull request as ready for review July 16, 2025 13:00
@ngoldbaum
Copy link
Member

Thanks Marco!

@ngoldbaum ngoldbaum merged commit 6e48cff into numpy:main Jul 16, 2025
77 checks passed
MaanasArora pushed a commit to MaanasArora/numpy that referenced this pull request Jul 16, 2025
IndifferentArea pushed a commit to IndifferentArea/numpy that referenced this pull request Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: mean param missing in ndarray.{std,var} docstring signatures

3 participants