Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix instance check #51

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ConnectedSystems
Copy link

Resubmitting PR.

This package does not work as expected under Windows due to differences in numpy object instance check., causing TypeError to be raised.

e.g. Under Ubuntu, Py2.7, numpy 1.14.3

>>> import numpy as np
>>> isinstance(np.int32(5), int), isinstance(np.int64(5), int)
(True, True)

Under Windows 10, Py2.7, numpy 1.14.3

>>> import numpy as np
>>> isinstance(np.int32(5), int), isinstance(np.int64(5), int)
(True, False)

Replaced base int type with Integral from the numbers package as a workaround

>>> import numpy as np
>>> from numbers import Integral
>>> isinstance(np.int32(5), Integral), isinstance(np.int64(5), Integral)
(True, True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant