Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update abs_Min.py #1004

Merged
merged 5 commits into from
Jul 11, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update abs_min.py
  • Loading branch information
SandersLin authored Jul 11, 2019
commit d5313eff54af501c4f03df34c0211b244f9c7abf
4 changes: 2 additions & 2 deletions maths/abs_min.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from abs import absVal
from abs import abs_val
def absMin(x):
"""
# >>>absMin([0,5,1,11])
Expand All @@ -8,7 +8,7 @@ def absMin(x):
"""
j = x[0]
for i in x:
if absVal(i) < absVal(j):
if abs_val(i) < abs_val(j):
j = i
return j

Expand Down