code: def _swaplch(LCH):
      "Reverse the order of an LCH numpy dstack or tuple for analysis."
      try: # Numpy array
          L,C,H = np.dsplit(LCH,3)
          return np.dstack((H,C,L))
      except: # Tuple
          L,C,H = LCH
          return H,C,f _swaplch(LCH):
      "Reverse the order of an LCH numpy dstack or tuple for analysis."
      try: # Numpy array
          L,C,H = np.dsplit(LCH,3)
          return np.dstack((H,C,L))
      except: # Tuple
          L,C,H = LCH
          return H,C,L
docs: Reverse the order of an LCH numpy dstack or tuple for analysis.