refactor: Don’t directly import numpy and add gen_types
decorator
#966
+114
−42
gen_types
decorator
#966