docs: def resample(self, resampledWaveTab):
          """Resample the spectrum for the given wavelength set.
  
          Given wavelength array must be monotonically increasing
          or decreasing. Flux interpolation is done using :func:`numpy.interp`.
  
          Parameters
          ----------
          resampledWaveTab : array_like
              Wavelength set for resampling.
  
          Returns
          -------
          resampled : `ArraySourceSpectrum`
              Resampled spectrum.
  
          """
          # Check whether the input wavetab is in descending order
          if resampledWaveTab[0] < resampledWaveTab[-1]:
              newwave = resampledWaveTab
              newasc = True
          else:
              newwave = resampledWaveTab[::-1]
              newasc = False
  
          # Use numpy interpolation function
          if self._wavetable[0] < self._wavetable[-1]:
              oldasc = True
              ans = N.interp(newwave, self._wavetable, self._fluxtable)
          else:
              oldasc = False
              rev = N.interp(newwave, self._wavetable[::-1],
                             self._fluxtable[::-1])
              ans = rev[::-1]
  
          # If the new and old waveset don't have the same parity,
          # the answer has to be flipped again
          if (newasc != oldasc):
              ans = ans[::-1]
  
          # Finally, make the new object
          # NB: these manipulations were done using the internal
          # tables in Angstrom and photlam, so those are the units
          # that must be fed to the constructor.
          resampled = ArraySourceSpectrum(wave=resampledWaveTab.copy(),
                                          waveunits='angstroms',
                                          flux=ans.copy(),
                                          fluxunits='photlam',
                                          keepneg=True)
  
          # Use the convert method to set the units desired by the user.
          resampled.convert(self.waveunits)
          resampled.convert(self.fluxunits)
  
          return resampled