@spectrum.setter
    def spectrum(self, value):

        if value is not None:

            if hasattr(self, '_temperature') and self._temperature is not None:
                raise Exception("A temperature has already been set, so cannot set a spectrum")

            if isinstance(value, Table):

                if 'nu' not in value.columns:
                    raise TypeError("spectrum Table does not contain a"
                                    " 'nu' column")

                if 'fnu' not in value.columns:
                    raise TypeError("spectrum Table does not contain an"
                                    " 'fnu' column")

                nu, fnu = value['nu'], value['fnu']

            elif (tuple, list) in type(value):

                if len(value) == 2:
                    nu, fnu = value
                else:
                    raise TypeError("spectrum tuple or list should contain"
                                    " two elements")

                if type(nu) in [list, tuple]:
                    nu = np.array(nu, dtype=float)
                else:
                    nu = nu.astype(float)

                if type(fnu) in [list, tuple]:
                    fnu = np.array(fnu, dtype=float)
                else:
                    fnu = fnu.astype(float)

                if not is_numpy_array(nu) or nu.ndim != 1:
                    raise TypeError("nu should be a 1-D sequence")

                if not is_numpy_array(fnu) or fnu.ndim != 1:
                    raise TypeError("fnu should be a 1-D sequence")

                if nu.shape != fnu.shape:
                    raise TypeError("nu and fnu should have the same shape")

            else:

                raise TypeError('spectrum should be specified either as an '
                                'astropy.table.Table instance, or a tuple '
                                'of two 1-D Numpy arrays (nu, fnu) with the '
                                'same length')

            # Check if frequency array has duplicate values
            if len(np.unique(nu)) != len(nu):
                raise ValueError("nu sequence contains duplicate values")

            # Check for any negative values

            if np.any(nu <= 0.):
                raise ValueError("nu should be strictly positive")

            if np.any(fnu < 0.):
                raise ValueError("fnu should be positive")

            # Check for any NaN or Inf values

            if np.any(np.isnan(nu) | np.isinf(nu)):
                raise ValueError("nu contains NaN/Inf values")

            if np.any(np.isnan(fnu) | np.isinf(fnu)):
                raise ValueError("fnu contains NaN/Inf values")

            # Check if spectrum needs sorting
            if not monotonically_increasing(nu):
                logger.warn("Spectrum is being re-sorted in order of increasing frequency")
                order = np.argsort(nu)
                nu = nu[order]
                fnu = fnu[order]

            self._spectrum = {'nu': nu, 'fnu': fnu}

        else:

            self._spectrum = value
dataset/ETHPy150Open hyperion-rt/hyperion/hyperion/sources/source.py/Source.spectrum/swapped operands of `in`