[Numpy-discussion] Using numpy's flatten_dtype with structured dtypes that have titles

Emma Willemsma emma.willemsma@morgansolar....
Mon Aug 23 11:10:29 CDT 2010


Thank you Pierre, I have opened the ticket as requested.

On Mon, Aug 23, 2010 at 11:09 AM, Pierre GM <pgmdevlist@gmail.com> wrote:

>
> On Aug 23, 2010, at 10:50 AM, Emma Willemsma wrote:
>
> > I have attached a short script and sample text file that demonstrate the
> problem. The dtype I'm using in the example is:
> >
> > dtype2 =
> numpy.dtype([(("Amps","Current"),"f8"),(("Volts","Voltage"),"f8"),(("Watts","Power"),"f8")])
> >
> > When I run the code as-is, I get the ValueError. If I run it with the
> monkey patch, it runs as I would expect.
> >
> > On the other hand, if I remove the titles from the dtype, the code works
> with or without the monkey patch. Without the titles, the dtype looks like:
> >
> > dtype1 = numpy.dtype([("Current","f8"),("Voltage","f8"),("Power","f8")])
> >
> > Thanks very much for your help with this issue.
> >
> > Emma
>
> Emma,
> Please open a ticket. That's a bug in flatten_dtype, which cannot handle
> titles in the dtype (as I never used titles, I forgot they were there...).
> I'll try to take care of that ASAP.
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100823/e470d8fb/attachment.html 


More information about the NumPy-Discussion mailing list