Dear Cython users,
I am a very ignorant Cython user - and even weaker in terms of C skills, so I apologize in advance for the dumb questions.
I have a little Cython wrapper for a library written in C: this library expects, amongst other things, a 2D array of type double (float64), but for reasons long enough to explain, I have as input a 2D array of type float (float32) - and it’s also in Fortran order and the order should be preserved.
I know that I could simply and blindly do something like this in numpy:
double_array = float_array.astype(np.float64)
And pass that to my Cython wrapper. However, for matrices big enough, this is not exactly super performant. Does anyone have any suggestions on how to make that step in Cython or C potentially a bit faster?
Thank you in advance for your help.
Andrea.