Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arr = [-0.1, 0.0, 0.5, 0.8, 1.2]
- dist = [0.1, 0.5, 0.3, 0.4] # must be >0.25 for all elements
- good_array = [-0.25, 0.0, 0.5, 0.8, 1.2] # all elements distance > threshold
- [-0.2, 0.05, 0.5, 0.8, 1.2]
- [-0.1, 0.15, 0.5, 0.8, 1.2]
- [-0.3, 0.15, 0.2, 0.7] # modify arr[1] rather than arr[2]
Add Comment
Please, Sign In to add comment