Open thouis opened 12 years ago
Comment in Trac by trac user takluyver, 2012-01-15
Comment in Trac by atmention:charris, 2012-04-12
With python 3.2.1 I get an error:
>>> d
{1: array([ 1., 1., 1., 1., 1.]), 2: array([ 0., 0., 0., 0., 0.])}
>>> np.concatenate(d.values())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'dict_values' object does not support indexing
So this looks like it might be a Python bug as far as the segfault goes. I don't know that we should support the new dict_values type.
Comment in Trac by atmention:charris, 2012-04-12
Replying to [comment:2 charris]:
With python 3.2.1 I get an error:
{{{
d {1: array([ 1., 1., 1., 1., 1.]), 2: array([ 0., 0., 0., 0., 0.])} np.concatenate(d.values()) Traceback (most recent call last): File "
", line 1, in TypeError: 'dict_values' object does not support indexing }}}
So this looks like it might be a Python bug as far as the segfault goes. I don't know that we should support the new dict_values type.
Oh, and this is with current devel. Could you test that to see if it is still a problem?
Original ticket http://projects.scipy.org/numpy/ticket/2019 Reported 2012-01-15 by trac user takluyver, assigned to unknown.
Steps to reproduce:
gdb output:
This is with Python 3.2.2 on 32-bit Linux. Converting it to a list works fine: