[Numpy-discussion] checksum on numpy float array

Robert Kern robert.kern@gmail....
Thu Dec 4 17:36:20 CST 2008

On Thu, Dec 4, 2008 at 17:17, Brennan Williams
<brennan.williams@visualreservoir.com> wrote:
> My app reads in one or more float arrays from a binary file.
> Sometimes due to network timeouts etc the array is not read correctly.
> What would be the best way of checking the validity of the data?
> Would some sort of checksum approach be a good idea?
> Would that work with an array of floating point values?
> Or are checksums more for int,byte,string type data?

Just use a generic hash on the file's bytes (ignoring their format).
MD5 is sufficient for these purposes.

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

More information about the Numpy-discussion mailing list