#!/usr/bin/python # # Werner Lustermann # ETH Zurich # # test / example: save multiple arrays into a file # import numpy as np a = np.zeros( 10 ) b = np.ones( (10, 3) ) print 'a', a print 'b', b np.savez( 'save.npz', amplitude = a, time = b ) f = np.load( 'save.npz' ) print 'f.files' print f.files ampl = f['amplitude'] time = f['time'] print 'ampl', ampl print 'time', time