A Dimarts 29 Agost 2006 09:01, Torgil Svensson va escriure:
> table.read() seems to be broken with:
> >>> tables.__version__
>
> '1.3.2'
>
> >>> numpy.__version__
>
> '1.0b4'
>
[snipped]
> >>> test('numpy','three')
>
> ['a', 'c', 'd']
> Table length:  4
> Traceback (most recent call last):
>   File "<pyshell#55>", line 1, in ?
>     test('numpy','three')
>   File "C:\ws\Charlotte\PS\test.py", line 33, in test
>     d=t1.read()
>   File "C:\Python24\Lib\site-packages\tables\Table.py", line 1195, in read
>     arr = tonumpy(arr, copy=False)
>   File "C:\Python24\Lib\site-packages\tables\utils.py", line 716, in
> tonumpy npa = numpy.array(buffer, dtype=array.array_descr)
> ValueError: Can't get buffer pointer from byteswapped or misaligned array.
>
> Is there an quick and easy solution to this problem? For now I guess
> I'll have to iterate my tables which takes much more time, especially
> when copying one table to another.

Yes, use the latest release of pytables (1.3.3) released some days ago.
The ultimate cause for this is that recent versions of NumPy are using the 
array protocol version 3 while numarray is still using version 2. I've 
already asked for an update on numarray:

http://aspn.activestate.com/ASPN/Mail/Message/numpy-discussion/3249308

Meanwhile, pytables 1.3.3 has a workaround for avoiding the issue.

> Thanks for a great product. I'm looking forward to the numpy migration
> release!

Well, we are (slowly) working on migrating PyTables Pro first. Standard 
PyTables will come later on (which will receive all the expertise acquired 
during the first migration). In any case, it seems like NumPy is getting 
mature enough at good pace, which is great news.

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&kid=120709&bid=263057&dat=121642
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to