parameters: (self, a)
docstring: Write array to flow file.
docstring_summary: Write array to flow file.
docstring_tokens: Write array to flow file .
function: def write_object(self, a):
      """Write array to flow file."""
      if a is None:
        self.write_long(0)
      elif isinstance(a, bytes):
        self.write_long(len(a))
        self.f.write(a)
      elif isinstance(a, bytearray):
        b = bytes(a)
        self.write_long(len(b))
        self.f.write(b)
      elif isinstance(a, str):
        a = a.encode()
        self.write_long(len(a))
        self.f.write(a)
      elif isinstance(a, float):
        data = pack('f', a);
        self.write_long(len(data))
        self.f.write(data)
      elif isinstance(a, int):
        data = pack('i', a);
        self.write_long(len(data))
        self.f.write(data)
      elif isinstance(a, array.array):
        m = memoryview(a)
        self.write_long(m.nbytes)
        self.f.write(m)
      elif isinstance(a, memoryview):
        self.write_long(a.nbytes)
        self.f.write(a)
      else:
        self.write_long(a.nbytes)
        self.write(a.tostring())
function_tokens: def write_object ( self , a ) : if a is None : self . write_long ( 0 ) elif isinstance ( a , bytes ) : self . write_long ( len ( a ) ) self . f . write ( a ) elif isinstance ( a , bytearray ) : b = bytes ( a ) self . write_long ( len ( b ) ) self . f . write ( b ) elif isinstance ( a , str ) : a = a . encode ( ) self . write_long ( len ( a ) ) self . f . write ( a ) elif isinstance ( a , float ) : data = pack ( 'f' , a ) self . write_long ( len ( data ) ) self . f . write ( data ) elif isinstance ( a , int ) : data = pack ( 'i' , a ) self . write_long ( len ( data ) ) self . f . write ( data ) elif isinstance ( a , array . array ) : m = memoryview ( a ) self . write_long ( m . nbytes ) self . f . write ( m ) elif isinstance ( a , memoryview ) : self . write_long ( a . nbytes ) self . f . write ( a ) else : self . write_long ( a . nbytes ) self . write ( a . tostring ( ) )