0

With pytables's CArray, is there a way to specify the order in which the data is stored on disk (Fortran/C)?

I am looking for something similar to ndarray's order parameter.

NPE
  • 486,780
  • 108
  • 951
  • 1,012

1 Answers1

2

You can use the chunkshape parameter that in effect specifies the data order:

http://pytables.github.com/usersguide/libref.html#tables.File.createCArray

For instance, for 2-D data, chunkshape=(2000, 1) would be efficient if data is accessed in Fortran order, and chunkshape=(1, 2000) if it is accessed in C order. You may need to play with the numbers a bit: http://pytables.github.com/usersguide/optimization.html

pv.
  • 33,875
  • 8
  • 55
  • 49