-
-
Save SemantiveCode/1f4709f0cbd96a1541ad384e8dfc1cc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def einsum(v, u): | |
z = v - u | |
return np.sqrt(np.einsum('i,i->', z, z)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment