toko mysql numpy array

myNumpyArray = np.random.rand((3,3))

#convert to list, then to string, then store as VARCHAR(20000) in mysql
numpyString = str(myNumpyArray.tolist()) 
query = "insert into mytable(mycolumn) VAlUES ('"+numpyString+"')"
cursor.execute(query)

#Note: to retreive from mysql,you can convert to array using eval:
#myArray = eval(mycolumn)
Friendly Hawk