Advertisement
Guest User

Untitled

a guest
Jan 4th, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. import numpy as np
  2.  
  3. count=max(len(text1), len(text2))
  4. a = np.fromstring(text1 + '\0'*count, count=count, dtype=np.int8)
  5. b = np.fromstring(text2 + '\0'*count, count=count, dtype=np.int8)
  6. print np.asarray(a==b, dtype=np.int8)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement