I was wondering if it is possible to pass pointer to an ndarray to a
function. For example in the following function (from CythonGSL example):
cdef double normal(double x, void * params) nogil:
cdef double mu = (<double_ptr> params)[0]
cdef double sigma = (<double_ptr> params)[1]
return gsl_ran_gaussian_pdf(x - mu, sigma)
I wonder if I can pass an ndarray as one of the params as well. I want to
use GSL's minimizers to minimize a function and the funcion need a ndarray
as data.
Best,
Joon