[Numpy-discussion] 1.1.1rc1 to be tagged tonight

Stéfan van der Walt stefan@sun.ac...
Tue Jul 22 10:18:25 CDT 2008

2008/7/22 Charles R Harris <charlesr.harris@gmail.com>:
>> That's easy to fix.  New patch attached.
> Yep, but I wanted you to look it over and find all the problems ;)

Ah, you have your managerial hat on!

> Could you post a patch against current mainline svn, which already has your
> previous patch applied? I'm also curious why we need tuples, are we using
> these values as hashes someplace.

Applied.  The reason we need to use tuples is because

In [3]: np.array([[1, 2], [3, 4]], dtype=[('x', int), ('y', int)])
TypeError                                 Traceback (most recent call last)

/Users/stefan/<ipython console> in <module>()

TypeError: expected a readable buffer object


In [4]: np.array([(1, 2), (3, 4)], dtype=[('x', int), ('y', int)])
array([(1, 2), (3, 4)],
      dtype=[('x', '<i4'), ('y', '<i4')])


More information about the Numpy-discussion mailing list