code: def join_struct_arrays(arrays):
      
      # taken from http://stackoverflow.com/questions/5355744/numpy-joining-structured-arrays
      sizes = np.array([a.itemsize for a in arrays])
      offsets = np.r_[0, sizes.cumsum()]
      shape = arrays[0].shape
      joint = np.empty(shape + (offsets[-1],), dtype=np.uint8)
      for a, size, offset in zip(arrays, sizes, offsets):
          joint[...,offset:offset+size] = np.atleast_1d(a).view(np.uint8).reshape(shape + (size,))
      dtype = sum((a.dtype.descr for a in arrays), [])
      return joint.ravel().view(dtype)
docs: Takes a list of possibly structured arrays, concatenates their
      dtypes, and returns one big array with that dtype. Does the
      inverse of ``separate_struct_array``.
  
      :param list arrays: List of ``np.ndarray``s