Rectangle#
- class scipy.spatial.Rectangle(maxes, mins)[source]#
Hyperrectangle class.
Represents a Cartesian product of intervals.
- Parameters:
- maxesarray_like of shape (m,)
Upper bounds of the hyperrectangle along each dimension.
- minsarray_like of shape (m,)
Lower bounds of the hyperrectangle along each dimension.
- Attributes:
- maxesndarray of shape (m,)
Upper bounds for each dimension.
- minsndarray of shape (m,)
Lower bounds for each dimension.
- mint
Dimensionality of the hyperrectangle.
Methods
max_distance_point(x[, p])Return the maximum distance between input and points in the hyperrectangle.
max_distance_rectangle(other[, p])Compute the maximum distance between points in the two hyperrectangles.
min_distance_point(x[, p])Return the minimum distance between input and points in the hyperrectangle.
min_distance_rectangle(other[, p])Compute the minimum distance between points in the two hyperrectangles.
split(d, split)Produce two hyperrectangles by splitting.
volume()Compute the total volume of the hyperrectangle.
Notes
If any element of maxes is smaller than the corresponding element in mins, the values are swapped automatically.