mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 02:18: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
ae37fc40be
commit
14a3fb419d
@ -48,7 +48,7 @@ def interquartile_range(x: np.array) -> float:
|
||||
if length == 0:
|
||||
raise ValueError("The list is empty. Provide a non-empty list.")
|
||||
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
|
||||
q3 = find_median(x[half_length:length])
|
||||
return q3 - q1
|
||||
|
Loading…
x
Reference in New Issue
Block a user