diff --git a/compiler/base/vector.py b/compiler/base/vector.py index 7339c472..6533e09e 100644 --- a/compiler/base/vector.py +++ b/compiler/base/vector.py @@ -14,13 +14,15 @@ class vector(): def __init__(self, x, y=None): """ init function support two init method""" # will take single input as a coordinate - if y==None: + if len(x)==2: self.x = float(x[0]) self.y = float(x[1]) #will take two inputs as the values of a coordinate - else: + elif y: self.x = float(x) self.y = float(y) + else: + debug.error("Invalid vector specification.",-1) def __str__(self): """ override print function output """ diff --git a/compiler/gdsMill/gdsMill/vlsiLayout.py b/compiler/gdsMill/gdsMill/vlsiLayout.py index 93436a73..f3ce204c 100644 --- a/compiler/gdsMill/gdsMill/vlsiLayout.py +++ b/compiler/gdsMill/gdsMill/vlsiLayout.py @@ -619,7 +619,8 @@ class VlsiLayout: def updateBoundary(self,thisBoundary,cellBoundary): [left_bott_X,left_bott_Y,right_top_X,right_top_Y]=thisBoundary - if cellBoundary==[None,None,None,None]: + # If any are None + if cellBoundary[0]==None or cellBoundary[1]==None or cellBoundary[2]==None or cellBoundary[3]==None: cellBoundary=thisBoundary else: if cellBoundary[0]>left_bott_X: