code: def _getaxis(z, axis):
      """get the selected axis of the multi-valued array
  
      Args:
        z (ndarray): an array of shape ``(npts, N)``
        axis (int): index of the desired column of the multi-valued array ``z``
  
      Returns:
        array of shape ``(npts,)`` corresponding to the selected column of ``z``
      """
      if len(z) and not hasattr(z[0], "__len__"):
          msg = "cannot get axis=%s for single-valued array" % axis
          raise ValueError(msg)
      if axis is None:
          axis = slice(None)
      elif len(z) and axis >= len(z[0]):
          if len(z[0]) < 1:
              msg = (
                  "cannot get axis=%s for empty array" % axis
              )  # XXX: ?
          else:
              msg = "axis should be an int in the range 0 to %s" % (
                  len(z[0]) - 1
              )
          raise ValueError(msg)
      # select values corresponding to axis
      if type(z) not in (list, tuple):
          return z[:, axis]
      return type(z)(i[axis] for i in z)
  
imports: from mystic.math import _rbf
label_desc: Use image node_id 20 for calling a global function with example usage: _getaxis(z, axis) and returns: type, z