diff options
author | Digya053 <digyaacharyaa@gmail.com> | 2022-09-19 02:38:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-19 09:38:33 +0200 |
commit | b4d24a5ca83ddfa4d10af4018a17d5db71df340f (patch) | |
tree | 24a9e81a01b6029cd341c242b864988bc03503b6 /numpy/core/fromnumeric.py | |
parent | bcb7962166ac8383ed844abc07cb8035feae0fed (diff) | |
download | numpy-b4d24a5ca83ddfa4d10af4018a17d5db71df340f.tar.gz |
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
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 6 |
1 files changed, 3 insertions, 3 deletions
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 -------- |