How can a function in Cython take two numpy arrays of different types (e.g. one array of ints, the other array of floats) as arguments? The example here http://docs.cython.org/src/userguide/numpy_tutorial.html?highlight=numpy#adding-types shows how to do this for int arrays, but I'd like to have a function like:
import numpy as np
cimport numpy as np
## how do define array types here?
DTYPE = ???
ctypedef np.int_t DTYPE_t
def foo(np.array arr_of_ints, np.array arr_of_floats):
# divide integers by floats
result = arr_of_ints / arr_of_floats
How can this be done? thanks.