ot_markov_distances.misc module

just miscellanous functions copied over from tbrugere/ml_lib/misc

ot_markov_distances.misc.auto_repr(*fields: str)

decorator.

Creates an automatic __repr__ function for a class. useful for debugging since printing :param fields: the fields to display in that repr

ot_markov_distances.misc.all_equal(*args)

tests whether all the passed arguments are equal. useful for checking dimensions for a lot of vectors for ex

ot_markov_distances.misc.debug_time(out_string=None, log=<function info>)

only works if is_debug is True If out_string is true, prints out_string as well as the time elapsed since the last call to debug_time

Parameters:
  • out_string – (Default value = None)

  • log – what function to use to log (Default value = logging.info)

Returns: