added dot product functionality and fixed some type checking to isinstance()
Merge pull request #1 from iamtrask/andrew

added dot product functionality and fixed some type checking to isinstan...