def packl_ctypes_numpy(lnum):
    a = numpy.zeros(lnum.bit_length() // 8 + 1, dtype=numpy.uint8)
PyLong_AsByteArray(lnum, a, a.size, 0, 1)
return a
Is there a faster way to convert an arbitrary large integer to a big endian sequence of bytes?