docs: def _move_tuple_axes_first(array, axis):
      """
      Bottleneck can only take integer axis, not tuple, so this function
      takes all the axes to be operated on and combines them into the
      first dimension of the array so that we can then use axis=0
      """
  
      # Figure out how many axes we are operating over
      naxis = len(axis)
  
      # Add remaining axes to the axis tuple
      axis += tuple(i for i in range(array.ndim) if i not in axis)
  
      # The new position of each axis is just in order
      destination = tuple(range(array.ndim))
  
      # Reorder the array so that the axes being operated on are at the beginning
      array_new = np.moveaxis(array, axis, destination)
  
      # Figure out the size of the product of the dimensions being operated on
      first = np.prod(array_new.shape[:naxis])
  
      # Collapse the dimensions being operated on into a single dimension so that
      # we can then use axis=0 with the bottleneck functions
      array_new = array_new.reshape((first,) + array_new.shape[naxis:])
  
      return array_new