def datahash(*arrays):
    """Hash the data buffers of some arrays."""
    hashstr = ''
    for arr in arrays:
        w = arr.flags.writeable
        arr.flags.writeable = False
        hashstr += '[{}{}]'.format(hash(bytes(arr)), arr.shape)
        arr.flags.writeable = w
    return hash(hashstr)