code: def clip(self, channels=True):
          
          if not isinstance(channels, (tuple, list)):
              channels = [channels] * len(self.channels)
  
          for i in range(len(self.channels)):
              if channels[i]:
                  self.channels[i] = np.ma.clip(self.channels[i], 0.0, 1.0)
docs: Limit the values of the array to the default [0,1] range. *channels*
          says which channels should be clipped.