def _values_of_same_type(self, val1, val2):

        if isinstance(val1, Quantity):
            try:
                if not val1.has_same_dimensions(val2):
                    return False
            except __HOLE__:
                return False
        elif isinstance(val2, Quantity):
            try:
                if not val2.has_same_dimensions(val1):
                    return False
            except AttributeError:
                return False

        elif not super(BrianParameter, self)._values_of_same_type(val1, val2):
            return False


        return True
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/brian/parameter.py/BrianParameter._values_of_same_type