[Numpy-discussion] 1.1.1rc1 to be tagged tonight

Charles R Harris charlesr.harris@gmail....
Tue Jul 22 12:06:52 CDT 2008


On Tue, Jul 22, 2008 at 10:52 AM, Pierre GM <pgmdevlist@gmail.com> wrote:

> On Tuesday 22 July 2008 12:48:20 Charles R Harris wrote:
> > I fixed it, Pierre. You can't do
> >
> > (_[1] for _ in ddtype.descr)
>
> > to get a tuple.
>
> OK, thx for that. AAMOF, lines 243-245 should be:
> self._fill_value = np.array(tuple(fillval),
>                                        dtype=[(_[0], _[1])
>                                               for _ in ddtype.descr])
>
> I guess 2.3 choked on the generator instead of the list.
>

I just replaced () by []. The 1.1.x version is now

dt = zip(ddtype.names, [s[1] for s in ddtype.descr])

Which should have the same effect, although not done as slickly.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080722/1e778884/attachment.html 


More information about the Numpy-discussion mailing list