@@ -388,7 +388,7 @@ def iterable(y):
388
388
389
389
def _weights_are_valid (weights , a , axis ):
390
390
"""Validate weights array.
391
-
391
+
392
392
We assume, weights is not None.
393
393
"""
394
394
wgt = np .asanyarray (weights )
@@ -448,7 +448,7 @@ def average(a, axis=None, weights=None, returned=False, *,
448
448
The calculation is::
449
449
450
450
avg = sum(a * weights) / sum(weights)
451
-
451
+
452
452
where the sum is over all included elements.
453
453
The only constraint on the values of `weights` is that `sum(weights)`
454
454
must not be 0.
@@ -2049,7 +2049,7 @@ def disp(mesg, device=None, linefeed=True):
2049
2049
"(deprecated in NumPy 2.0)" ,
2050
2050
DeprecationWarning ,
2051
2051
stacklevel = 2
2052
- )
2052
+ )
2053
2053
2054
2054
if device is None :
2055
2055
device = sys .stdout
@@ -3847,7 +3847,7 @@ def median(a, axis=None, out=None, overwrite_input=False, keepdims=False):
3847
3847
Axis or axes along which the medians are computed. The default,
3848
3848
axis=None, will compute the median along a flattened version of
3849
3849
the array.
3850
-
3850
+
3851
3851
.. versionadded:: 1.9.0
3852
3852
3853
3853
If a sequence of axes, the array is first flattened along the
@@ -4396,7 +4396,7 @@ def quantile(a,
4396
4396
4397
4397
For weighted quantiles, the coverage conditions still hold. The
4398
4398
empirical cumulative distribution is simply replaced by its weighted
4399
- version, i.e.
4399
+ version, i.e.
4400
4400
:math:`P(Y \\ leq t) = \\ frac{1}{\\ sum_i w_i} \\ sum_i w_i 1_{x_i \\ leq t}`.
4401
4401
Only ``method="inverted_cdf"`` supports weights.
4402
4402
@@ -4842,7 +4842,7 @@ def find_cdf_1d(arr, cdf):
4842
4842
return result
4843
4843
4844
4844
r_shape = arr .shape [1 :]
4845
- if quantiles .ndim > 0 :
4845
+ if quantiles .ndim > 0 :
4846
4846
r_shape = quantiles .shape + r_shape
4847
4847
if out is None :
4848
4848
result = np .empty_like (arr , shape = r_shape )
0 commit comments