docs: def validate(self, size):
          """
          Ensure that the size of the dimension matches the number of bands in the
          scale
  
          Raises:
               ValueError: when the dimension size and number of bands don't match
          """
          msg = 'scale and array size must match, ' \
                'but were scale: {self.scale.n_bands},  array size: {size}'
  
          if size != len(self.scale):
              raise ValueError(msg.format(**locals()))