
On Sat, Sep 14, 2013 at 12:12 AM, Christoph Gohlke <cgohlke@uci.edu> wrote:
On 9/13/2013 7:10 PM, Charles R Harris wrote:
Hi Christolph,
Could you debug this a bit?
ERROR: test_record_no_hash (test_multiarray.TestRecord) ---------------------------------------------------------------------- Traceback (most recent call last): File "X:\Python33\lib\site- packages\numpy\core\tests\test_multiarray.py", line 2464, in test_record_no_hash self.assertRaises(TypeError, hash, a[0]) File "X:\Python33\lib\unittest\case.py", line 570, in assertRaises return context.handle('assertRaises', callableObj, args, kwargs) File "X:\Python33\lib\unittest\case.py", line 135, in handle callable_obj(*args, **kwargs) File "X:\Python33\lib\unittest\case.py", line 153, in __exit__ self.obj_name)) TypeError: unhashable type: 'writeable void-scalar'
I don't understand that at all.
<snip>
Chuck
I could reproduce the weirdness outside the testsuite on 64 bit Python 3.2, 3.3 and 3.4. It looks like the interpreter gets corrupted.
It could be due to numpy 1.8 using a wrong signature for the hash function [1] on win-amd64-py3.x. Since Python 3.2 the return value must be of type `Py_hash_t` (defined as `Py_ssize_t`) [2], not `C long` as for Python <= 3.1.
[1]
https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/scalart... [2] http://docs.python.org/3.2/c-api/typeobj.html#PyTypeObject.tp_hash
That would do it. I'll bet you are right. Chuck