docs: def resize_jac(self, func):
          """
          Removes values with identical indices to fixed parameters from the
          output of func. func has to return the jacobian of a scalar function.
  
          :param func: Jacobian function to be wrapped. Is assumed to be the
              jacobian of a scalar function.
          :return: Jacobian corresponding to non-fixed parameters only.
          """
          if func is None:
              return None
          @wraps(func)
          def resized(*args, **kwargs):
              out = func(*args, **kwargs)
              # Make one dimensional, corresponding to a scalar function.
              out = np.atleast_1d(np.squeeze(out))
              mask = [p not in self._fixed_params for p in self.parameters]
              return out[mask]
          return resized