Python wrappers for SciDB access


#1

Hi All

I’ve started writing some wrappers for accessing SciDB in Python.
github.com/dllahr/scidb_python_utils

I’ve written a brief description here:
dllahr.blogspot.com/2012/12/pyth … 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.

Thanks,
Dave


#2

Dave:

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]

Cheers,
Tim


#3

Thanks so much! That worked!