roualdes / bridgestan

BridgeStan provides efficient in-memory access through Python, Julia, and R to the methods of a Stan model.
https://roualdes.github.io/bridgestan
BSD 3-Clause "New" or "Revised" License
87 stars 12 forks source link

Python: allow ctypes pointers for in/out parameters #193

Closed WardBrian closed 7 months ago

WardBrian commented 7 months ago

Closes #190

This makes the minimal changes required to accept ctypes.POINTER(ctypes.c_double) types alongside numpy arrays for parameter arrays and out parameters

bob-carpenter commented 7 months ago

Thanks for updating---looks good.

WardBrian commented 7 months ago

@roualdes I performed the following renames:

generic_double_array back to double_array unc_p_double_array to param_sized_out_array unc_p2_double_array to param_sqrd_out_array

I also created a new writeable_double_array to use in the place you pointed out above