sabato 23 gennaio 2010

IDL2PYTHON dictionary: how to save and load arrays

One of the most useful function in IDL is the save/restore function.
In Python it is very easy to store and reload data too.
Let's say we have an array A(50,50) and we want to save/load it in/from the directory "/home/user/":


from scipy import *

save('/home/user/A', A)
load('/home/user/A.npy')


Nessun commento:

Posta un commento