WrapperAddressProtocol With Pointers and Arrays

I would like to be able to pass arrays of doubles from an @njit function to a C function. The C function takes a pointer to the first element (double*) and a length. I have been unable to find any examples for this in the documentation.

I have the following WAP class

class ECQuantLinearRegressionFunc(numba.types.WrapperAddressProtocol):
    def __wrapper_address__(self):
        return ctypes.cast(clib.linear_regression, ctypes.c_voidp).value
    def signature(self):
        return numba.void( numba.types.CPointer(numba.float64), numba.types.CPointer(numba.float64), numba.types.CPointer(numba.float64), numba.types.CPointer(numba.float64),  numba.types.CPointer(numba.float64))

Calling the function from a @njit function results in the following errors

- argument 0: Cannot determine Numba type of <class 'awkward_cpp._kernel_signatures.LP_c_double'>
- argument 1: Cannot determine Numba type of <class 'awkward_cpp._kernel_signatures.LP_c_double'>
- argument 3: Cannot determine Numba type of <class 'awkward_cpp._kernel_signatures.LP_c_double'>
- argument 4: Cannot determine Numba type of <class 'awkward_cpp._kernel_signatures.LP_c_double'>

Can someone point me to a working example using WAP or is WAP not the correct approach?

If you haven’t seen this yet, this discussion is relevant: