faster numpyfycation