Fixed use of filter for py3 compatibility.
Changed equality check to identity check for correct behaviour with custom objects.
Merge pull request #8 from Gitusername/master

Tiny fixes for compatibility with python 3 and numpy