A Dilluns 08 Maig 2006 14:18, Pepe Barbe va escriure:
> On 5/8/06, Francesc Altet <[EMAIL PROTECTED]> wrote:
> > Yes, the routine conversions of PyTables were the culprit. When the
> > VLArray was feed with objects having a different size than the
> > underlying atom, a conversion was needed (but not done!). A cure for
> > this is attached. The same patch has been applied to SVN trunk as well
> > as 1.3 branch, plus updated unit tests to avoid this problem to appear
> > again in the future. Please, check if this works for you.
>
> Thanks for the reply. As an addendum, I managed to make it work
> without the patch. Instead of feeding the information using
> Vlarray.append(array(missing)), I used  Vlarray.append(missing), where
> missing was a List and it all looks all right now.
>
> What I don't know if there is any difference between converting it to
> array before feeding it to VLarray or not.

It should not, because if the flavor is set to, say, "numpy" the
strings will be converted to numpy after reading. What happened was
that PyTables does accept numarray strings natively (for string Atoms,
I mean) but the code for accepting numarray (and numpy) was broken in
the sense that the strings were not adapted to the Atom size.

In case of feeding with native python strings, the length was forced
to match that of the Atom. This is why your solution works. With the
patch you can use again numpy (or numarray or Numeric) strings as
inputs.

Cheers,

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to