code: def _nanmean(array, axis=None):
      
  
      if isinstance(axis, tuple):
          array = _move_tuple_axes_first(array, axis=axis)
          axis = 0
      return bottleneck.nanmean(array, axis=axis)
docs: Bottleneck nanmean function that handle tuple axis.