Skip to content

Instantly share code, notes, and snippets.

@mdouze
Created January 9, 2019 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdouze/a1ecc330a7c0685e25916bcb526007f1 to your computer and use it in GitHub Desktop.
Save mdouze/a1ecc330a7c0685e25916bcb526007f1 to your computer and use it in GitHub Desktop.
import numpy as np
a = np.array([0, 0], dtype='float32')
b = np.array([0, 10000], dtype='float32')
c = np.array([1, 10000], dtype='float32')
diff_ab = ((a - b) ** 2).sum()
diff_ac = ((a - c) ** 2).sum()
# diff_ab = diff_ac = 100000000.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment