Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def normalize(points, height=10):
- new_points = []
- mini = min(points)
- for point in points:
- new_points.append(point-mini)
- newer_points = []
- maxi = max(new_points)
- for point in new_points:
- newer_points.append(point*height/maxi)
- return newer_points
- points=[-2,0,1]
- print normalize(points)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement