Advertisement
gauravssnl

normalize.py

Apr 28th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. def normalize(a):
  2.     a = [ (x-min(a)) /(max(a)-min(a)) for x in a]
  3.     return a
  4.  
  5. print(normalize( [10.5,30.9,20.5,26.5,40.0] ) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement