You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_collections_hashable fails on windows python 3.4 #5647
test introduced in gh-5326
isinstance(np.array([]), collections.Hashable) is true on windows python 3.4.3 built with msvc
though what is weird that both hash(x) and x.hash() raise an exception as expected, no clue whats going on.
np.ndarray.__dict__["__hash__"] is <slot wrapper '__hash__' of 'numpy.ndarray' objects>, not None, hence isinstance(x, collections.Hashable) returns True.
Activity
cournape commentedon Mar 11, 2015
Not on the top of my head. The isinstance check is False as expected everywhere else, correct ?
jaimefrio commentedon Mar 11, 2015
I also see this in Python 2.7.5 with numpy built from a more or less recent master, using 32 bit MinGW. It is only the
isinstancecheck that fails.cgohlke commentedon Aug 2, 2015
test_collections_hashablealso fails here on python 3.4.3 and 3.5.0b4, win-amd64:Python's test for "hashability" is at https://hg.python.org/cpython/file/c7273b46980c/Lib/_collections_abc.py#l73.
np.ndarray.__dict__["__hash__"]is<slot wrapper '__hash__' of 'numpy.ndarray' objects>, notNone, henceisinstance(x, collections.Hashable)returns True.hash(np.array([]))correctly raisesTypeError.Relevant Python docs:
charris commentedon Aug 27, 2015
Marking this as something to take another look at for the 1.10 release.
charris commentedon Jan 12, 2016
What has happened with this? Anyone. We don't see errors on AppVeyor.
mattip commentedon Jan 21, 2019
Closing, it seems the actual issue is lost in the haze of time. If needed please open a new issue with a reproducer.