Update abs_Min.py (#1004)

* Update abs_Min.py

* Create __init__.py

* Rename abs_Min.py to abs_min.py

* Update abs_min.py
This commit is contained in:
Sanders Lin 2019-07-12 00:20:41 +08:00 committed by cclauss
parent 5f991f7740
commit c2f2fa8b23
2 changed files with 4 additions and 2 deletions

1
maths/__init__.py Normal file
View File

@ -0,0 +1 @@

View File

@ -1,4 +1,5 @@
from Maths.abs import absVal
from abs import abs_val
def absMin(x):
"""
# >>>absMin([0,5,1,11])
@ -8,7 +9,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