[Numpy-discussion] Pickling and initializing

Dinesh B Vadhia dineshbvadhia@hotmail....
Mon Mar 3 17:29:11 CST 2008


When you pickle a numpy/scipy matrix does it have to be initialized by another program?  For example:

Program One:
    A = scipy.asmatrix(scipy.empty((i, i)), dtype=int)        # initialize matrix A
    <do something with A>
    pickle.dump(A)

Program Two:
    pickle.load(A)


.. in Program Two, do we need the statement:

    A = scipy.asmatrix(scipy.empty((i, i)), dtype=int)        # initialize matrix A

before the pickle.load(A)?

If not, why not and doesn't this make documentation difficult?

Dinesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080303/63c2b2e1/attachment-0001.html 


More information about the Numpy-discussion mailing list