import numpy as np
cimport numpy as np

np.import_array()  # Must if Numpy -C API is used in Code


# The wrapper code, with numpy type annotations:-
def cos_doubles_func(np.ndarray[double, ndim=1] in_array not None,
                     np.ndarray[double, ndim=1] out_array not None):
    
    cdef int p = 50
    cdef np.ndarray[double, ndim=1, mode="c"] temp = in_array[in_array > p]
    cos_doubles( np.PyArray_DATA(temp),  np.PyArray_DATA(out_array), temp.shape[0])

cdef void cos_doubles(double * in_array, double * out_array, int size):
    cdef int i;
    print size
    for i in range(size):
        print in_array[i]

# INPUT: 
[1] a = np.array([1,255,55,45,85]).astype(np.double)
[2] exp.cos_doubles_func(a, a)
# OUTPUT: 
255.0
55.0
85.0