I usually save data in npz files in python. How to write a function which loads the npz file and automatically creates arrays which are present in the .npz
file. For example, say there are three arrays A
, B
, and C
in a file named some_data.npz
.
What I want the function to do is load the npz
file as
data1 = np.load('some_data.npz')
and then automatically create three arrays named data1A
, data1B
and data1C
which stores the arrays A
, B
, and C
from the original .npz
file. How to do this?