More idiomatic use of numpy

Also, added a .gitignore