def words2bytes(data, length=8):
 try:
  return data.tostring()
 except AttributeError:
  return np.uint64(data).tostring()

def words2bytes ( data , length = 8 ) : try : return data . tostring ( ) except AttributeError : return np . uint64 ( data ) . tostring ( )
return a length * 8 byte string from data .