code: def _remove_na_single(x, axis="rows"):
      """Remove NaN in a single array.
      This is an internal Pingouin function.
      """
      if x.ndim == 1:
          # 1D arrays
          x_mask = ~np.isnan(x)
      else:
          # 2D arrays
          ax = 1 if axis == "rows" else 0
          x_mask = ~np.any(np.isnan(x), axis=ax)
      # Check if missing values are present
      if ~x_mask.all():
          ax = 0 if axis == "rows" else 1
          ax = 0 if x.ndim == 1 else ax
          x = x.compress(x_mask, axis=ax)
      return x
  
file_path: pingouin/pingouin/utils.py
imports: import numbers
  import numpy
  import pandas
  import itertools
  import collections.abc
  from tabulate import tabulate
  from .config import options
label_desc: Use image node_id 5 for calling a global function with example usage: _remove_na_single(x, axis) and returns: x