Skip to content

Commit 52679dc

Browse files
committed
Restore trailing whitespace
1 parent 5a3ba2a commit 52679dc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

numpy/lib/_function_base_impl.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def iterable(y):
388388

389389
def _weights_are_valid(weights, a, axis):
390390
"""Validate weights array.
391-
391+
392392
We assume, weights is not None.
393393
"""
394394
wgt = np.asanyarray(weights)
@@ -448,7 +448,7 @@ def average(a, axis=None, weights=None, returned=False, *,
448448
The calculation is::
449449
450450
avg = sum(a * weights) / sum(weights)
451-
451+
452452
where the sum is over all included elements.
453453
The only constraint on the values of `weights` is that `sum(weights)`
454454
must not be 0.
@@ -2049,7 +2049,7 @@ def disp(mesg, device=None, linefeed=True):
20492049
"(deprecated in NumPy 2.0)",
20502050
DeprecationWarning,
20512051
stacklevel=2
2052-
)
2052+
)
20532053

20542054
if device is None:
20552055
device = sys.stdout
@@ -3847,7 +3847,7 @@ def median(a, axis=None, out=None, overwrite_input=False, keepdims=False):
38473847
Axis or axes along which the medians are computed. The default,
38483848
axis=None, will compute the median along a flattened version of
38493849
the array.
3850-
3850+
38513851
.. versionadded:: 1.9.0
38523852
38533853
If a sequence of axes, the array is first flattened along the
@@ -4396,7 +4396,7 @@ def quantile(a,
43964396
43974397
For weighted quantiles, the coverage conditions still hold. The
43984398
empirical cumulative distribution is simply replaced by its weighted
4399-
version, i.e.
4399+
version, i.e.
44004400
:math:`P(Y \\leq t) = \\frac{1}{\\sum_i w_i} \\sum_i w_i 1_{x_i \\leq t}`.
44014401
Only ``method="inverted_cdf"`` supports weights.
44024402
@@ -4842,7 +4842,7 @@ def find_cdf_1d(arr, cdf):
48424842
return result
48434843

48444844
r_shape = arr.shape[1:]
4845-
if quantiles.ndim > 0:
4845+
if quantiles.ndim > 0:
48464846
r_shape = quantiles.shape + r_shape
48474847
if out is None:
48484848
result = np.empty_like(arr, shape=r_shape)

numpy/lib/tests/test_function_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,7 @@ def test_positional_regression_9477(self):
19041904

19051905
def test_datetime_conversion(self):
19061906
otype = "datetime64[ns]"
1907-
arr = np.array(['2024-01-01', '2024-01-02', '2024-01-03'],
1907+
arr = np.array(['2024-01-01', '2024-01-02', '2024-01-03'],
19081908
dtype='datetime64[ns]')
19091909
assert_array_equal(np.vectorize(lambda x: x, signature="(i)->(j)",
19101910
otypes=[otype])(arr), arr)

0 commit comments

Comments
 (0)