updated to npy_intp/Py_Ssize_t