mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 10:28:39 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
ee3247bd1c
commit
436a48324e
@ -47,7 +47,7 @@ def inter_quartile_range(x: np.array) -> float:
|
|||||||
if length == 0:
|
if length == 0:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
x.sort()
|
x.sort()
|
||||||
q1 = find_median(x[0: length // 2])
|
q1 = find_median(x[0 : length // 2])
|
||||||
half_length = (length // 2) + 1 if length % 2 else length // 2
|
half_length = (length // 2) + 1 if length % 2 else length // 2
|
||||||
q3 = find_median(x[half_length:length])
|
q3 = find_median(x[half_length:length])
|
||||||
return q3 - q1
|
return q3 - q1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user