Added pure python function that got lost during porting.
Fixed Travis