Skip to content

Instantly share code, notes, and snippets.

@kangeugine
Created August 2, 2018 15:32
Show Gist options
  • Save kangeugine/7078a58cdcc3839f71d58fb5a8db43b3 to your computer and use it in GitHub Desktop.
Save kangeugine/7078a58cdcc3839f71d58fb5a8db43b3 to your computer and use it in GitHub Desktop.
def constraint_unique(x):
n1 = x.size
n2 = np.unique(to_int(x)).size
return n1 - n2
# if constraint_unique(x) == 0, test passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment