code: def moveaxis(a, source, destination):
      
      import numpy
      if hasattr(numpy, 'moveaxis'):
          return numpy.moveaxis(a, source, destination)
  
      try:
          source = list(source)
      except TypeError:
          source = [source]
      try:
          destination = list(destination)
      except TypeError:
          destination = [destination]
  
      source = [ax + a.ndim if ax < 0 else ax for ax in source]
      destination = [ax + a.ndim if ax < 0 else ax for ax in destination]
  
      order = [n for n in range(a.ndim) if n not in source]
  
      for dest, src in sorted(zip(destination, source)):
          order.insert(dest, src)
  
      return a.transpose(order)
docs: Move axes of an array to new positions.
  
      Other axes remain in their original order.
  
      This function is a backport of `numpy.moveaxis` introduced in
      NumPy 1.11.
  
      See Also
      --------
      numpy.moveaxis