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

Stéfan van der Walt stefan@sun.ac...
Mon Aug 23 03:28:45 CDT 2010

Hi Emma

On 19 August 2010 23:07, Emma Willemsma <emma.willemsma@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.


More information about the NumPy-Discussion mailing list