summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
diff options
context:
space:
mode:
authorczgdp1807 <gdp.1807@gmail.com>2021-06-15 08:39:33 +0530
committerczgdp1807 <gdp.1807@gmail.com>2021-06-15 08:39:33 +0530
commita09929b31747cf675a4993c4de636b237db9ee2b (patch)
treea93edba594663ecf587f7d0ed4c4ceeae408ebb0 /numpy/core/fromnumeric.py
parent342e0c55d97a49749ed685d7f0f4ab03f5c8551b (diff)
parent75f852edf94a7293e7982ad516bee314d7187c2d (diff)
downloadnumpy-a09929b31747cf675a4993c4de636b237db9ee2b.tar.gz
Merge branch 'main' into never_copy
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r--numpy/core/fromnumeric.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index 65a42eb1e..820d6831f 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -1318,8 +1318,9 @@ def searchsorted(a, v, side='left', sorter=None):
Returns
-------
- indices : array of ints
- Array of insertion points with the same shape as `v`.
+ indices : int or array of ints
+ Array of insertion points with the same shape as `v`,
+ or an integer if `v` is a scalar.
See Also
--------
@@ -2088,9 +2089,9 @@ def clip(a, a_min, a_max, out=None, **kwargs):
Notes
-----
- When `a_min` is greater than `a_max`, `clip` returns an
- array in which all values are equal to `a_max`,
- as shown in the second example.
+ When `a_min` is greater than `a_max`, `clip` returns an
+ array in which all values are equal to `a_max`,
+ as shown in the second example.
Examples
--------
@@ -2525,7 +2526,7 @@ def cumsum(a, axis=None, dtype=None, out=None):
>>> b = np.array([1, 2e-9, 3e-9] * 1000000)
>>> b.cumsum()[-1]
1000000.0050045159
- >>> b.sum()
+ >>> b.sum()
1000000.0050000029
"""