class_docstr: Common features in univariate interpolation
  
  Deal with input data type and interpolation axis rolling. The
  actual interpolator can assume the y-data is of shape (n, r) where
  `n` is the number of x-points, and `r` the number of variables,
  and use self.dtype as the y-data type.
  
  Attributes
  ----------
  _y_axis
      Axis along which the interpolation goes in the original array
  _y_extra_shape
      Additional trailing shape of the input arrays, excluding
      the interpolation axis.
  dtype
      Dtype of the y-data arrays. Can be set via _set_dtype, which
      forces it to be float or complex.
  
  Methods
  -------
  __call__
  _prepare_x
  _finish_y
  _reshape_yi
  _set_yi
  _set_dtype
  _evaluate
docstr: Reshape interpolated y back to an N-D array similar to initial y
docstr_tok: ["Reshape","interpolated","y","back","to","an","N-D","array","similar","to","initial","y"]
code: def _finish_y(self, y, x_shape):
      """Reshape interpolated y back to an N-D array similar to initial y"""
      y = y.reshape(x_shape + self._y_extra_shape)
      if self._y_axis != 0 and x_shape != ():
          nx = len(x_shape)
          ny = len(self._y_extra_shape)
          s = (
              list(range(nx, nx + self._y_axis))
              + list(range(nx))
              + list(range(nx + self._y_axis, nx + ny))
          )
          y = y.transpose(s)
      return y
  
imports: import numpy
  from scipy.special import factorial
  from scipy._lib._util import _asarray_validated, float_factorial
label_desc: Use image node_id 5 for calling the _Interpolator1D obj's underlying member method code with example usage: obj._finish_y(y, x_shape) and returns: y