Added a monkey patching for _cook_nd_args to fix the long annoying bug that numpy 1.6.2 and lower has.