def wrapTimestamp(self, stamp):
     if stamp is None:
         raise ValueError('Wrapper cannot wrap timestamp null')
     data = bytearray()
     ts = (stamp - np.datetime64('1970-01-01T00:00:00Z')) / np.timedelta64(
         1, 's')
     data = util.addLong(data, ts)
     return TLVFixed(AMQPType.TIMESTAMP, data)
 def convertLong(self, l):
     data = bytearray()
     if l == 0:
         return data
     elif l >= -128 and l <= 127:
         return l
     else:
         data = util.addLong(data, l)
         return data
 def convertULong(self, l):
     data = bytearray()
     if l == 0:
         return data
     elif l > 0 and l <= 255:
         return l
     else:
         data = util.addLong(data, l)
         return data
 def __init__(self, value):
     data = bytearray()
     if isinstance(value, bytearray):
         data = value
     if isinstance(value, np.int8):
         data = util.addByte(data, value)
     if isinstance(value, np.int16):
         data = util.addShort(data, value)
     if isinstance(value, np.int32):
         data = util.addInt(data, value)
     if isinstance(value, np.int64):
         data = util.addLong(data, value)
     if isinstance(value, np.float32):
         data = util.addFloat(data, value)
     if isinstance(value, np.complex128):
         data = util.addDouble(data, value)
     self.value = data