brainconn.utils.misc¶
Miscellaneous utility functions.
Functions
cuberoot (x) |
Correctly handle the cube root for negative weights, instead of uselessly crashing as in python or returning the wrong root as in matlab |
dummyvar (cis[, return_sparse]) |
This is an efficient implementation of matlab’s “dummyvar” command using sparse matrices. |
get_resource_path () |
Returns the path to general resources, terminated with separator. |
pick_four_unique_nodes_quickly (n) |
This is equivalent to np.random.choice(n, 4, replace=False) |
teachers_round (x) |
Do rounding such that .5 always rounds to 1, and not bankers rounding. |
Exceptions
BCTParamError |