Anyone knows is there any other adapter between numpy array and sqlite database bes开发者_如何学Goides the atpy?
Thanks!
Rgs,
KC
Can you use the default package, sqlite3
?
In [1]: import sqlite3
In [3]: conn = sqlite3.connect('test.db')
In [4]: cur = conn.cursor()
In [5]: cur.execute('select * from table1')
Out[5]: <sqlite3.Cursor object at 0xa3142c0>
In [6]: scipy.array(cur.fetchall())
Out[6]:
array([[ 1., 2.],
[ 3., 4.]])
精彩评论