Add fix for importing the numpy API in as_numpy properly