[I've just seen this bounce. Please always try to write to the list from a subscribed address]
---------------------------------------------------------------------- De: Grace Li <fullofgrac...@gmail.com> A: pytables-users@lists.sourceforge.net Data: Diumenge 18:03:50 > > Dear users, > > I'm a new adopter of pytables and I am trying to convert my flat data > files into pytable files (h5 files). > My data files are basically columns of integers (some containing > mostly zeros). My script is reading in each of these files using the > numpy.genfromtxt() and then appending the numpy array with > tables.append(). I am currently storing all the data as columns in a > table. > > What I noticed was that after loading in the data and doing a ptdump > -d on the written pytable file, I find that > I am getting these extra rows appearing in between, what I expect to > be the data that I"ve loaded into the table. For example, please see > the attached part of my test datafile that I was working with and the > respective outputs from ptdump -d below. > > I was wondering if anyone has seen this behavior before? The system > I'm running on is a large computing linux cluster with pytables > version 2.2.1dev, numpy 1.3.0, hdf5 1.8.5. > > However, just to note that, my script works as expected on my local > machine (Macbook Pro running on Snow Leopard 10.6) with pytables > version 2.2.1 and numpy 1.4.1 and it works properly (ie. I do not get > this behavior). > > If anyone has seen this or has any suggestions, I would greatly > appreciate your help! > > Thanks, > > Grace > > >>>>>>>>>>>> BEGIN Example >>>>>>>>>> > > Sample text data file passed to genfromtxt(): > > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > > Numpy array that is created with sample data file: > array([[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., > 0., 0., 0., 0., 0.], > [ 2., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., > 0., 0., 0., 0., 0.], > [ 4., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., > 0., 0., 0., 0., 0.], > [ 6., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., > 0., 0., 0., 0., 0.], > [ 8., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., > 0., 0., 0., 0., 0.], > [ 10., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., > 0., 0., 0., 0., 0.], > [ 12., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., > 0., 0., 0., 0., 0.], > [ 14., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., > 0., 0., 0., 0., 0.]]) > > > ptdump -d output from the written hdf5 file: > > [0] (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [1] (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [2] (2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [3] (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [4] (4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [5] (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [6] (6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [7] (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [8] (8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [9] (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [10] (10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [11] (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [12] (12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [13] (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [14] (14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) > [15] (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) Well, if that works with your local machine, you may want to try installing a recent version of numpy (for example 1.5.0) in your production machine. You may also want to install a production release of pytables there (2.2). Hope this helps, -- Francesc Alted ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users