diff --git a/orangecontrib/text/vectorization/bagofwords.py b/orangecontrib/text/vectorization/bagofwords.py index b4c4078b9..f150c3cd2 100644 --- a/orangecontrib/text/vectorization/bagofwords.py +++ b/orangecontrib/text/vectorization/bagofwords.py @@ -46,7 +46,7 @@ class BowVectorizer(BaseVectorizer): wlocals = OrderedDict(( (COUNT, lambda tf: tf), - (BINARY, lambda tf: int(tf > 0)), + (BINARY, lambda tf: np.greater(tf, 0, dtype=np.int)), (SUBLINEAR, lambda tf: 1 + np.log(tf)), ))