Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def func(array1, array2):
- result = 0
- for x in range(len(array1)):
- for y in range(len(array1)):
- result += (array1[y, x] - array2[y, x]) * (array1[y, x] - array2[y, x])
- return sqrt(result)
- for x, vector in enumerate(vectors_list):
- for entry_code_book in code_book:
- distance_table.append(func(vector, entry_code_book))
Advertisement
Add Comment
Please, Sign In to add comment