From b4d24a5ca83ddfa4d10af4018a17d5db71df340f Mon Sep 17 00:00:00 2001 From: Digya053 Date: Mon, 19 Sep 2022 02:38:33 -0500 Subject: DOC: Update for return value of np.ptp() (#22276) * Update documentation for return value of np.ptp() * Update integer value to scalar to accomodate other numeric data types * Add examples to np.char.isdigit() * Remove extra space and example Closes gh-18719 --- numpy/core/fromnumeric.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'numpy/core/fromnumeric.py') diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index e1c99e61f..ed1eeb908 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -2647,9 +2647,9 @@ def ptp(a, axis=None, out=None, keepdims=np._NoValue): Returns ------- - ptp : ndarray - A new array holding the result, unless `out` was - specified, in which case a reference to `out` is returned. + ptp : ndarray or scalar + The range of a given array - `scalar` if array is one-dimensional + or a new array holding the result along the given axis Examples -------- -- cgit v1.2.1