Hi list,
I am storing a NumPy array in binary form in Postgres with:
import numpy as np
...
my_array = np.array(data_list, np.float32)
cur.execute("insert into my_table values (%s)", (psycopg2.Binary(my_array),))
I've confirmed that this works fine. However when I query this binary data from the database I am having trouble deserializing/getting it back into a NumPy array. The result comes back as a read-only buffer. Does psycopg2 have an opposite of Binary to handle this?
Thanks.