diff --git a/cf/data/data.py b/cf/data/data.py index 8be1c12282..61967d8c06 100644 --- a/cf/data/data.py +++ b/cf/data/data.py @@ -4218,25 +4218,6 @@ def _binary_operation(self, other, method): return self - def __query_set__(self, values): - """Implements the “member of set” condition.""" - i = iter(values) - v = next(i) - - out = self == v - for v in i: - out |= self == v - - return out - - def __query_wi__(self, value): - """Implements the “within a range” condition.""" - return (self >= value[0]) & (self <= value[1]) - - def __query_wo__(self, value): - """TODO.""" - return (self < value[0]) | (self > value[1]) - def _parse_indices(self, *args, **kwargs): """'cf.Data._parse_indices' is not available. diff --git a/cf/mixin/propertiesdata.py b/cf/mixin/propertiesdata.py index 27c97fdea2..0459fca05f 100644 --- a/cf/mixin/propertiesdata.py +++ b/cf/mixin/propertiesdata.py @@ -820,40 +820,6 @@ def _equivalent_data(self, other, atol=None, rtol=None, verbose=None): # # return matches - def __query_set__(self, values): - """Implements the “member of set” condition.""" - new = self.copy() - new.set_data(self.data.__query_set__(values), copy=False) - return new - - # def _query_contain(self, value): - # '''TODO# - # - # ''' - # new = self.copy() - # new.set_data(self.data._query_contain(value), copy=False) - # return new - - # def _query_contains(self, value): - # '''TODO - # - # ''' - # new = self.copy() - # new.set_data(self.data._query_contains(value), copy=False) - # return new - - def __query_wi__(self, value): - """Implements the “within a range” condition.""" - new = self.copy() - new.set_data(self.data.__query_wi__(value), copy=False) - return new - - def __query_wo__(self, value): - """Implements the “without a range” condition.""" - new = self.copy() - new.set_data(self.data.__query_wo__(value), copy=False) - return new - def _unary_operation(self, method): """Implement unary arithmetic operations on the data array. diff --git a/cf/query.py b/cf/query.py index 6f80960d1b..67932f9f86 100644 --- a/cf/query.py +++ b/cf/query.py @@ -690,13 +690,6 @@ def _evaluate(self, x, parent_attr): return (x < value[0]) | (x > value[1]) - # if operator == 'contains': - # _contain = getattr(x, '__query_contains__', None) - # if _contain is not None: - # return _contain(value) - # else: - # return x == value - if operator == "set": if isinstance(x, str): for v in value: