For Python 3 support map() function should be explicitly converted to a list if the object that is mapped is used more than once.
In the old implementation of e.g. smil.py, bs.neg_bags evaluates the mapped input: map(np.asmatrix,bags); then this same input is evaluated by bs.pos_bags. However, because in Python 3 map() returns an iterator, this iterator object was destroyed at the first evaluation and returns an empty object at the second evaluation. There are several of these issues throughout the code, which have been resolved in this commit.
For Python 3 support map() function should be explicitly converted to a list if the object that is mapped is used more than once. In the old implementation of e.g. smil.py, bs.neg_bags evaluates the mapped input: map(np.asmatrix,bags); then this same input is evaluated by bs.pos_bags. However, because in Python 3 map() returns an iterator, this iterator object was destroyed at the first evaluation and returns an empty object at the second evaluation. There are several of these issues throughout the code, which have been resolved in this commit.