Hi,
I've recently downloaded ALGLIB with the Python interface. I was surprised to see that only list type was accepted, and not numpy arrays for the spline interpolation routines. I'm not sure if I got it right, but after having a look at the Python wrapper, I indeed see that, eg. the function "is_real_vector" explicitly expects a list type, and nothing else. According to the test I've made for Akima spline, having to change my numpy arrays into list for the routine (which in turn will anyway change the numbers into ctypes) is between 8 to 16% slower than providing list directly, so this may have a huge impact for people already dealing with numpy arrays in their code. Does anyone have a good workaround, apart from modifying by hand the code?
Also I would suggest, if I may, to the author to just check for less specific types, and simply ask for objects that can be iterated over (which then would include numpy arrays). Also I would suggest that the check of any type in Python be done with the builtin function "isinstance(v, list)" rather than "type(v) == list".
Finally I'd like to say that the library looks really promising and good (I'm happy with the tests I've already ran). But as a Python user, I'd like to see numpy involved which would make much sense since ALGLIB is a library for mathematical routines.
Regards.
Last edited by mhavel on Sun May 20, 2012 2:53 am, edited 3 times in total.
