<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_fluxtable(self):
 """Check for non-negative fluxes. If found, the negative flux values are set to zero, and a warning is printed to screen. This check is not done if flux unit is a magnitude because negative magnitude values are legal. """

        # neg. magnitudes are legal
        if ((not self.fluxunits.isMag) and (self._fluxtable.min() < 0)):
            idx = N.where(self._fluxtable < 0)
            self._fluxtable[idx] = 0.0
            print("Warning, %d of %d bins contained negative fluxes; they "
                  "have been set to zero." % (
                      len(idx[0]), len(self._fluxtable)))