Python wrappers for SciDB access


Hi All

I’ve started writing some wrappers for accessing SciDB in Python.

I’ve written a brief description here: … scidb.html

One question I have is, when I’m reading from SciDB, as I’m reading attributes at a certain chunk and position within a chunk, how do I determine what the dimension values are? By using the “dir” command in python I was able to determine that the chunk iterator had a getPosition() method, which returns a “coordinates” class, but I could not figure out how to convert this into a set of dimensions. Any help greatly appreciated.




The returned coordinates are a SWIG wrapper around a std::vector<>. You can access individual coordinates with square brackets:

coordinates = chunk_iterator.getPosition()
print coordinates[0], coordinates[1]



Thanks so much! That worked!