A Friday 05 February 2010 23:23:51 Anthony Foglia escrigué: > Is there a way to get a Description from a numpy dtype? > > I'm working on a class that aggregates a bunch of identical Tables (one > for each day) and to create them, I was going to have the user pass in a > dtype, and determine the description from that. (I plan on most users > to pass the data into the writer as numpy.arrays of structured records.) > > The File.createTable currently does it through the Table._descrFromRA > method. That logic suits my needs fine, except it requires a Table > instance for the setting of the byte order. (Ideally it wouldn't > require an array, but just a dtype, but I can always make an empty array > of length one to pass in.)
Or pass an array of length zero better. > Is there any plans to make a freestanding > version of this function or should I just copy the logic? That could be a good idea. Please file an enhancement ticket and I'll see what I can do. Cheers, -- Francesc Alted ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users