small improvments to numpy/cython