code: def measure(self, ndim=None):
          
          if self.true_ndim == 0:
              return 0.0
  
          if ndim is None:
              return self.measure(ndim=self.true_ndim)
          elif ndim < self.true_ndim:
              return np.inf
          elif ndim > self.true_ndim:
              return 0.0
          else:
              return np.prod(self.extent[self.nondegen_byaxis])
docs: Return the Lebesgue measure of this interval product.
  
          Parameters
          ----------
          ndim : int, optional
              Dimension of the measure to apply. ``None`` is interpreted
              as `true_ndim`, which always results in a finite and
              positive result (unless the set is a single point).
  
          Examples
          --------
          >>> min_pt, max_pt = [-1, 2.5, 0], [-0.5, 10, 0]
          >>> rbox = IntervalProd(min_pt, max_pt)
          >>> rbox.measure()
          3.75
          >>> rbox.measure(ndim=3)
          0.0
          >>> rbox.measure(ndim=3) == rbox.volume
          True
          >>> rbox.measure(ndim=1)
          inf
          >>> rbox.measure() == rbox.squeeze().volume
          True