Python 2 compatibility, vectorized implementation.
Add README.