A Friday 19 November 2010 19:35:43 Anthony Scopatz escrigué: > Hello All, > > As per the createTable() > documentation<http://www.pytables.org/docs/manual/ch04.html#TableClas > sDescr>, I tried to make a new table using a numpy dtype as the > description. However, doing so fails with the following traceback: > > Traceback (most recent call last): > File "table_dtype.py", line 38, in <module> > table = f.createTable(f.root, 'table', dt, expectedrows=10) > File "/usr/lib64/python2.6/site-packages/tables/file.py", line 718, > in createTable > chunkshape=chunkshape, byteorder=byteorder) > File "/usr/lib64/python2.6/site-packages/tables/table.py", line > 558, in __init__ > "the ``description`` argument is not of a supported type: " > TypeError: the ``description`` argument is not of a supported type: > ``IsDescription`` subclass, ``Description`` instance, dictionary, or > record array > > Putting in the array itself works, however. Below is a sample code > that demonstrates this using the Particle example from the tutorial. > > Should I open a ticket for this? How difficult would this be to fix? > Is it just a type checking error? Obviously the code to turn a > dtype into a Description exists somewhere, because it is being used > when an array is supplied. Thanks for your support!
Support for NumPy dtypes in createTable has been implemented quite a while ago and, if fact, your script works perfectly here. Which version of PyTables are you using? Please update to a more recent version and try again. Cheers, -- Francesc Alted ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users