Although you cannot use import
without running the code; there is quite a swift way in which you can input your variables; by using numpy.savez
, which stores variables as numpy arrays in a .npz file. Afterwards you can load the variables using numpy.load
.
See a full description in the scipy documentation
Please note this is only the case for variables and arrays of variable, and not for methods, etc.