IntervalProd.measure¶
-
IntervalProd.
measure
(self, ndim=None)[source]¶ Return the Lebesgue measure of this interval product.
- Parameters
- ndimint, optional
Dimension of the measure to apply.
None
is interpreted astrue_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