check length and nans for all input arrays.
upgrade the c files to cython 0.20 and recent changes.