# Buggy code
def __call__(self, inst):
    if inst.domain is not self.last_domain:
        self.cache_position(inst.domain)
    value = inst[self.pos_cache]
    if self.oper == self.IsDefined:
        return not np.isnan(value)
    if self.case_sensitive:
        value = str(value)
        refval = str(self.ref)
    else:
        value = str(value).lower()
        refval = str(self.ref).lower()
    if self.oper == self.Equal:
        return value == refval
    if self.oper == self.NotEqual:
        return value != refval
    if self.oper == self.Less:
        return value < refval
    if self.oper == self.LessEqual:
        return value <= refval
    if self.oper == self.Greater:
        return value > refval
    if self.oper == self.GreaterEqual:
        return value >= refval
    if self.oper == self.Contains:
        return refval in value
    if self.oper == self.StartsWith:
        return value.startswith(refval)
    if self.oper == self.EndsWith:
        return value.endswith(refval)
    high = self.max if self.case_sensitive else self.max.lower()
    if self.oper == self.Between:
        return refval <= value <= high
    if self.oper == self.Outside:
        return not refval <= value <= high
    raise ValueError("invalid operator")


# Traceback (TypeError)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "<string>", line 10, in <module>
File "C:\Users\reads\AppData\Local\Continuum\miniconda3\envs\orange-spectroscopy\lib\site-packages\Orange\data\filter.py", line 64, in __call__
return data._filter_is_defined(self.columns, self.negate)
File "C:\Users\reads\AppData\Local\Continuum\miniconda3\envs\orange-spectroscopy\lib\site-packages\Orange\data\table.py", line 1141, in _filter_is_defined
remove = np.logical_or(remove, bn.anynan([col], axis=0))
File "C:\Users\reads\AppData\Local\Continuum\miniconda3\envs\orange-spectroscopy\lib\site-packages\bottleneck\slow\reduce.py", line 86, in anynan
return np.isnan(a).any(axis)
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

# Fixed code
def __call__(self, inst):
    # the function is a large 'switch'; pylint: disable=too-many-branches
    value = inst[inst.domain.index(self.column)]
    if self.oper == self.IsDefined:
        return not np.isnan(value)
    if self.case_sensitive:
        value = str(value)
        refval = str(self.ref)
    else:
        value = str(value).lower()
        refval = str(self.ref).lower()
    if self.oper == self.Equal:
        return value == refval
    if self.oper == self.NotEqual:
        return value != refval
    if self.oper == self.Less:
        return value < refval
    if self.oper == self.LessEqual:
        return value <= refval
    if self.oper == self.Greater:
        return value > refval
    if self.oper == self.GreaterEqual:
        return value >= refval
    if self.oper == self.Contains:
        return refval in value
    if self.oper == self.StartsWith:
        return value.startswith(refval)
    if self.oper == self.EndsWith:
        return value.endswith(refval)
    high = self.max if self.case_sensitive else self.max.lower()
    if self.oper == self.Between:
        return refval <= value <= high
    if self.oper == self.Outside:
        return not refval <= value <= high
    raise ValueError("invalid operator")