(self, filter)
return sel
Return selection of rows matching the filter conditions

        Handles conjunction/disjunction and negate modifiers

        Parameters
        ----------
        filter: Values object containing the conditions

        Returns
        -------
        A 1d bool array. len(result) == len(self)
Return selection of rows matching the filter conditions
Return selection of rows matching the filter conditions
def _values_filter_to_indicator(self, filter):
        """Return selection of rows matching the filter conditions

        Handles conjunction/disjunction and negate modifiers

        Parameters
        ----------
        filter: Values object containing the conditions

        Returns
        -------
        A 1d bool array. len(result) == len(self)
        """
        from Orange.data.filter import Values

        if isinstance(filter, Values):
            conditions = filter.conditions
            conjunction = filter.conjunction
        else:
            conditions = [filter]
            conjunction = True
        if conjunction:
            sel = np.ones(len(self), dtype=bool)
        else:
            sel = np.zeros(len(self), dtype=bool)

        for f in conditions:
            selection = self._filter_to_indicator(f)

            if conjunction:
                sel *= selection
            else:
                sel += selection

        if filter.negate:
            sel = ~sel
        return sel
def _values_filter_to_indicator ( self , filter ) : from Orange . data . filter import Values if isinstance ( filter , Values ) : conditions = filter . conditions conjunction = filter . conjunction else : conditions = [ filter ] conjunction = True if conjunction : sel = np . ones ( len ( self ) , dtype = bool ) else : sel = np . zeros ( len ( self ) , dtype = bool ) for f in conditions : selection = self . _filter_to_indicator ( f ) if conjunction : sel *= selection else : sel += selection if filter . negate : sel = ~ sel return sel