code: def interp(self, coords=None, method='linear', assume_sorted=False,
                 kwargs={}, **coords_kwargs):
          if self.dtype.kind not in 'uifc':
              raise TypeError('interp only works for a numeric type array. '
                              'Given {}.'.format(self.dtype))
          ds = self._to_temp_dataset().interp(
              coords, method=method, kwargs=kwargs, assume_sorted=assume_sorted,
              **coords_kwargs)
          return self._from_temp_dataset(ds)