deepdrivemd.utils

Functions

bestk(a, k[, smallest])

Return the best k values and correspdonding indices.

get_frameinfo()

hash2intarray(h)

intarray2hash(ia)

parse_args()

setup_mpi([comm])

setup_mpi_comm(distributed)

t1Dto2D(B)

t2Dto1D(A)

timer(label[, start, frameinfo])

Classes

Timer(label)

class deepdrivemd.utils.Timer(label: str)
deepdrivemd.utils.bestk(a: npt.ArrayLike, k: int, smallest: bool = True) Tuple[npt.ArrayLike, npt.ArrayLike]

Return the best k values and correspdonding indices.

Parameters
  • a (npt.ArrayLike) – Array of dim (N,)

  • k (int) – Specifies which element to partition upon.

  • smallest (bool) – True if the best values are small (or most negative). False if the best values are most positive.

Returns

  • npt.ArrayLike – Of length k containing the k smallest values in a.

  • npt.ArrayLike – Of length k containing indices of input array a coresponding to the k smallest values in a.

deepdrivemd.utils.get_frameinfo() inspect.Traceback
deepdrivemd.utils.hash2intarray(h)
deepdrivemd.utils.intarray2hash(ia)
deepdrivemd.utils.parse_args() argparse.Namespace
deepdrivemd.utils.setup_mpi(comm: Optional[Any] = None) Tuple[int, int]
deepdrivemd.utils.setup_mpi_comm(distributed: bool) Optional[Any]
deepdrivemd.utils.t1Dto2D(B)
deepdrivemd.utils.t2Dto1D(A)
deepdrivemd.utils.timer(label: str, start: int = 1, frameinfo: Optional[inspect.Traceback] = None) None