r"""Convenience alias to :meth:`filter`.
496159
def analyze(self, s, method='chebyshev', order=30):
        """
        if s.ndim == 3 and s.shape[-1] != 1:
            raise ValueError('Last dimension (#features) should be '
                             '1, got {}.'.format(s.shape))
        return self.filter(s, method, order)
293781
def _get_filter_modifier(self, field):
        """"""
        tokens = field.split(FIELD_SEPARATOR)
        if len(tokens) == 1:
            return field, ""
        if tokens[-1] in self.FILTER_OPERATORS.keys():
            return u'.'.join(tokens[:-1]), tokens[-1]
        return u'.'.join(tokens), ""
414434
def filter(self, data, collection, **kwargs):
        """"""
        if not data or self.filters is None:
            return None, collection

        filters = {}
        for f in self.filters:
            if f.name not in data:
                continue
            ops, collection = f.filter(collection, data, **kwargs)
            filters[f.name] = ops

        return filters, collection
119673
def applyFilters(self, endpoint):
        """"""
        for filter_function in self.filter_functions:
            e = filter_function(endpoint)
            if e is not None:
                # Once one of the filters has returned an
                # endpoint, do not apply any more.
                return e

        return None
1219282
def _filter(self, objects, **kwargs):
        """"""
        for obj in objects:
            if self.filter(obj, **kwargs) is False:
                return False

        return True
430648
def filter_(f, x):
    
    return reduce(lambda e, v: e.extend(v), x.fmap(f))
683054
def create_filter(self):
        """"""
        return Filter(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
784026
def filter(self, **kwargs):
        """"""
        assert not self._primary_keys
        self.queryset = self.queryset.filter(**kwargs)
        return self
294715
def filter(self, table, domains, filter_string):
        """"""
        q = filter_string.lower()

        def comp(domain):
            if q in domain.name.lower():
                return True
            return False

        return filter(comp, domains)
645123
def smooth(data, fw):
    """"""
    if fw == 0:
        fdata = data
    else:
        fdata = lfilter(np.ones(fw)/fw, 1, data)
    return fdata
735237
def filter(self, table, group_types, filter_string):
        """"""
        query = filter_string.lower()
        return [group_type for group_type in group_types
                if query in group_type.name.lower()]
165020
def filter(self, table, volume_types, filter_string):
        """"""
        query = filter_string.lower()
        return [volume_type for volume_type in volume_types
                if query in volume_type.name.lower()]
10012
def filter_data(self, data, values=None, args=None):
        """"""
        if args:
            if not args.rprotocol:
                return data
        if not values: values = args.rprotocol
        newdata = {}
        if 'parser' in data.keys():
            newdata['parser'] = data['parser']
            newdata['source_path'] = data['source_path']
            newdata['source_file'] = data['source_file']
            newdata['source_file_mtime'] = data['source_file_mtime']
            newdata['source_file_year'] = data['source_file_year']
        newdata['entries'] = []

        for entry in data['entries']:
            if 'protocol' in entry.keys():
                if entry['protocol'] not in values:
                    newdata['entries'].append(entry)
            else:
                newdata['entries'].append(entry)

        return newdata
1353697
def _get_upsampling_filter(size):
    """"""
    factor = (size + 1) // 2
    if size % 2 == 1:
        center = factor - 1
    else:
        center = factor - 0.5
    og = np.ogrid[:size, :size]
    filter = (1 - abs(og[0] - center) / factor) * \
             (1 - abs(og[1] - center) / factor)
    return filter
268221
def filter(self, table, cgroups, filter_string):
        """"""
        query = filter_string.lower()
        return [cgroup for cgroup in cgroups
                if query in cgroup.name.lower()]
109688
def filter_like(self, **filters):
        ''' 
        '''
        Query = {}
        for name, value in filters.items():
            name = resolve_name(self.type, name)
            Query[name] = re_compile(value, IGNORECASE)
        self.filter(QueryExpression(Query))
        return self
891614
def __filter(self, name):
        '''
        '''

        name = name.replace("'", '')
        name = name.replace('"', '')
        name = name.replace('!(null)', '')
        name = name.replace(" ", "_")
        name = name.replace("/", "_")
        name = name.replace(".", "_")
        return name.lower()