[Numpy-discussion] Using numpy's flatten_dtype with structured dtypes that have titles
Stéfan van der Walt
stefan at sun.ac.za
Mon Aug 23 04:28:45 EDT 2010
Hi Emma
On 19 August 2010 23:07, Emma Willemsma <emma.willemsma at morgansolar.com> wrote:
> I am working with structured arrays to store experimental data. I'm using
> titles to store information about my fields, in this case the units of
> measure. When I call numpy.lib.io.flatten_dtype() on my dtype, I get:
>
> ValueError: too many values to unpack
> File "c:\Python25\Lib\site-packages\numpy\lib\_iotools.py", line 78, in
> flatten_dtype
Could you please provide an example of your dtype, or of your .txt
file? With such a test case, we should be able to make flatten_dtype
more robust.
> The user who responded suggested the following monkey-patch:
Unfortunately, the monkey patch is aimed at addressing your issue
only, so we won't be able to use it as is.
Regards
Stéfan
More information about the NumPy-Discussion
mailing list