Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- count=max(len(text1), len(text2))
- a = np.fromstring(text1 + '\0'*count, count=count, dtype=np.int8)
- b = np.fromstring(text2 + '\0'*count, count=count, dtype=np.int8)
- print np.asarray(a==b, dtype=np.int8)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement