Jump to content
  • 0

Duplicating ctypes array to a permanent numpy array


bebrumfield123

Question

Hi,

   I have a ctypes array of c_double that I want to copy into a numpy float64 array.  I've tried to use the np.ctypes.as_array() method followed by np.copy without success.  Once the python script is completed and the memory released for the ctypes array the numpy array reference also vanishes.  Anyone have suggestions on what else i can try to create a permanent numpy array of the data independent of the ctype array?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...