[Numpy-discussion] PyTables & numarray 0.9 warning

Francesc Alted falted at pytables.org
Mon Mar 15 05:24:04 EST 2004


Many of you will know that a new version of numarray (0.9) has been
released past week. This new version has a number of cool features
(specially, being faster in certain situations that affect directly to
PyTables efficency :-).

Unfortunately, the new version of numarray has deprecated the "buffer"
keyword on the array() constructor, and that precise keyword was used in
PyTables (just in one line). I've uploaded a new version of PyTables in
the SourceForge repository with a cure on that. Please, if you have
downloaded PyTables *before* March, 9th, download again from the
PyTables web site (http://www.pytables.org) and rebuild the software (or
install the new autoinstallable binaries for Windows).

If you don't feel like having to do that, you can just apply this patch
to get rid of the problem:

--- tables/Array.py.orig        2004-03-15 13:56:01.000000000 +0100
+++ tables/Array.py             2004-03-15 13:56:13.000000000 +0100
@@ -483,7 +483,7 @@
         if repr(self.type) == "CharType":
             arr = strings.array(None, itemsize=self.itemsize, shape=shape)
-            arr = numarray.array(buffer=None, type=self.type, shape=shape)
+            arr = numarray.array(None, type=self.type, shape=shape)
             # Set the same byteorder than on-disk
             arr._byteorder = self.byteorder
         # Protection against reading empty arrays

My apologies for the inconveniences,

Francesc Alted

More information about the NumPy-Discussion mailing list