def _clear_weights():
 Distance.__dict__['_weights'].computed = False

def _clear_weights ( ) : Distance . __dict__ [ '_weights' ] . computed = False
hack around the lazy descriptor used to cache weights for distance calculations .