code: def multi(stream):
      
      stack = stream[0].data
      for tr in stream[1:]:
          stack = np.dstack(np.array([stack, tr.data]))
      multiplex = stack.reshape(stack.size, )
      return multiplex
docs: Internal multiplexer for multiplex_detect.
  
      :type stream: obspy.core.stream.Stream
      :param stream: Stream to multiplex
  
      :return: trace of multiplexed data
      :rtype: obspy.core.trace.Trace
  
      .. Note: Requires all channels to be the same length.
  
      Maps a standard multiplexed stream of seismic data to a single traces of \
      multiplexed data as follows:
  
      Input:
      x = [x1, x2, x3, ...]
      y = [y1, y2, y3, ...]
      z = [z1, z2, z3, ...]
  
      Output:
      xyz = [x1, y1, z1, x2, y2, z2, x3, y3, z3, ...]