I'm just coming to Python after many years of Matlab use. I'm still learning all the differences. I'm using Jupyter Notebooks (by necessity as it's with someone else who uses it)
Something I can't get my head round is saving variables so that they can be loaded in another script. I wan to run a script that processes some data, producing several variables. I then want to save those variables to file and be able to reload them in another script.
say my variable names are, 'wbl','wbr','body_ang'
In Matlab this is trivial, with something like:
save(filename,'wbl','wbr','body_ang')
I can then just load back the variables with:
load(filename)
I can't find anything that has the same functionality in Python. You can save the variables, using e.g. numpy.save, but it doesn't preserve the variable names. So unless you know the order you saved them in you can't recreate them.
I want them as separate variables, not just as part of an array (unless they can be easily recreated after loading).
It seems like such a simple and obvious thing, but I can't work out how to do it.