code: def _safe_squeeze(arr, *args, **kwargs):
      
      out = np.squeeze(arr, *args, **kwargs)
      if np.ndim(out) == 0:
          out = out.reshape((1,))
      return out
docs: numpy.squeeze will reduce a 1-item array down to a zero-dimensional "array",
      which is not necessarily desirable.
      This function does the squeeze operation, but ensures that there is at least
      1 dimension in the output.