Made is_integer py2/py3 compatible

It now also accepts numpy integers