Move some functions out into a numthy module.