Hi, I am trying to write a couple of simple functions to (1) save recarray's to an sqlite database and (2) load a recarray from an sqllite database. I am stuck on 2 points and hope there are some people on this list that use sqlite for numpy stuff.
1. How to detect the variable names and types from the sqlite database? I am using: conn = sqlite3.connect(fname,detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COL NAMES) but then how do you access the variable names and types and convert them to numpy types? 2. In saving the recarray to sqlite I need to get data types from data.dtype.descr and transform the names to types that sqlite knows: string --> text int --> integer float --> real I tried some things like: for i in data[0]: if type(i) == str This didn't work because the elements are numpy.strings and I couldn't get the comparison to work. I'd rather use the dtype descriptions directly but couldn't figure out how to do that either. Any suggestions are very welcome. Thanks!! Vincent
load_sqlite.py
Description: Binary data
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion