code: def _quickLevels(self, data):
          
          while data.size > 1e6:
              ax = np.argmax(data.shape)
              sl = [slice(None)] * data.ndim
              sl[ax] = slice(None, None, 2)
              data = data[sl]
          return self._levelsFromMedianAndStd(data)
docs: Estimate the min/max values of *data* by subsampling.