On Thu, Dec 4, 2008 at 18:54, Brennan Williams <[EMAIL PROTECTED]> wrote: > Thanks > > [EMAIL PROTECTED] wrote: >> I didn't check what this does behind the scenes, but try this >> >> > import hashlib #standard python library > import numpy as np >> m = hashlib.md5() >> m.update(np.array(range(100))) >> m.update(np.array(range(200)))
I would recommend doing this on the strings before you make arrays from them. You don't know if the network cut out in the middle of an 8-byte double. Of course, sending the lengths and other metadata first, then the data would let you check without needing to do expensivish hashes or checksums. If truncation is your problem rather than corruption, then that would be sufficient. You may also consider using the NPY format in numpy 1.2 to implement that. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
