hatchet.util package

Submodules

hatchet.util.colormaps module

class hatchet.util.colormaps.ColorMaps[source]

Bases: object

BrBG = ['\x1b[38;5;94m', '\x1b[38;5;179m', '\x1b[38;5;222m', '\x1b[38;5;116m', '\x1b[38;5;37m', '\x1b[38;5;23m']
PRGn = ['\x1b[38;5;90m', '\x1b[38;5;140m', '\x1b[38;5;183m', '\x1b[38;5;151m', '\x1b[38;5;70m', '\x1b[38;5;22m']
PiYG = ['\x1b[38;5;162m', '\x1b[38;5;176m', '\x1b[38;5;219m', '\x1b[38;5;149m', '\x1b[38;5;70m', '\x1b[38;5;22m']
PuOr = ['\x1b[38;5;130m', '\x1b[38;5;208m', '\x1b[38;5;220m', '\x1b[38;5;189m', '\x1b[38;5;104m', '\x1b[38;5;57m']
RdBu = ['\x1b[38;5;124m', '\x1b[38;5;209m', '\x1b[38;5;224m', '\x1b[38;5;153m', '\x1b[38;5;75m', '\x1b[38;5;25m']
RdGy = ['\x1b[38;5;124m', '\x1b[38;5;209m', '\x1b[38;5;223m', '\x1b[38;5;251m', '\x1b[38;5;244m', '\x1b[38;5;238m']
RdYlBu = ['\x1b[38;5;196m', '\x1b[38;5;208m', '\x1b[38;5;220m', '\x1b[38;5;153m', '\x1b[38;5;68m', '\x1b[38;5;24m']
RdYlGn = ['\x1b[38;5;196m', '\x1b[38;5;208m', '\x1b[38;5;220m', '\x1b[38;5;46m', '\x1b[38;5;34m', '\x1b[38;5;22m']
Spectral = ['\x1b[38;5;196m', '\x1b[38;5;208m', '\x1b[38;5;220m', '\x1b[38;5;191m', '\x1b[38;5;114m', '\x1b[38;5;26m']
get_colors(colormap, invert_colormap)[source]

Returns a list of colors based on the colormap and invert_colormap arguments.

hatchet.util.config module

hatchet.util.deprecated module

hatchet.util.deprecated.deprecated_params(**old_to_new)[source]
hatchet.util.deprecated.rename_kwargs(fname, old_to_new, kwargs)[source]

hatchet.util.dot module

hatchet.util.dot.to_dot(hnode, dataframe, metric, name, rank, thread, threshold, visited)[source]

Write to graphviz dot format.

hatchet.util.dot.trees_to_dot(roots, dataframe, metric, name, rank, thread, threshold)[source]

Calls to_dot in turn for each tree in the graph/forest.

hatchet.util.executable module

hatchet.util.executable.which(executable)[source]

Finds an executable in the user’s PATH like command-line which.

Parameters:

executable (str) – executable to search for

hatchet.util.profiler module

class hatchet.util.profiler.Profiler[source]

Bases: object

Wrapper class around cProfile. Exports a pstats file to be read by the pstats reader.

reset()[source]

Description: Resets the profilier.

start()[source]

Description: Place before the block of code to be profiled.

stop()[source]

Description: Place at the end of the block of code being profiled.

write_to_file(filename='', add_pstats_files=[])[source]

Description: Write the pstats object to a binary file to be read in by an appropriate source.

hatchet.util.profiler.print_incomptable_msg(stats_file)[source]

Function which makes the syntax cleaner in Profiler.write_to_file().

hatchet.util.timer module

class hatchet.util.timer.Timer[source]

Bases: object

Simple phase timer with a context manager.

end_phase()[source]
phase(name)[source]
start_phase(phase)[source]

Module contents