Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 9778ffe2 authored by EXT José Ignacio Requeno Jarabo's avatar EXT José Ignacio Requeno Jarabo
Browse files

Fixing initialization of Rectangle

parent e18883ba
Pipeline #31983 passed with stages
in 27 minutes and 34 seconds
......@@ -80,7 +80,7 @@ from ParetoLib._py3k import red
class Rectangle(object):
def __init__(self,
min_corner=(float('-inf'),) * 2,
max_corner=(float('-inf'),) * 2):
max_corner=(float('+inf'),) * 2):
# type: (Rectangle, tuple, tuple) -> None
"""
A Rectangle is represented by a couple of points (x, x'), i.e., the
......@@ -91,10 +91,10 @@ class Rectangle(object):
assert dim(min_corner) == dim(max_corner)
# min_corner, max_corner
# self.min_corner = tuple(min(mini, maxi) for mini, maxi in zip(min_corner, max_corner))
# self.max_corner = tuple(max(mini, maxi) for mini, maxi in zip(min_corner, max_corner))
self.min_corner = min_corner
self.max_corner = max_corner
self.min_corner = tuple(min(mini, maxi) for mini, maxi in zip(min_corner, max_corner))
self.max_corner = tuple(max(mini, maxi) for mini, maxi in zip(min_corner, max_corner))
# self.min_corner = min_corner
# self.max_corner = max_corner
# Volume (self.vol) is calculated on demand the first time is accessed, and cached afterwards.
# Using 'None' for indicating that attribute vol is outdated (e.g., user changes min_corner or max_corners).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment