mtenv.utils package

Submodules

mtenv.utils.seeding module

mtenv.utils.seeding.np_random(seed: Optional[int]) → Tuple[numpy.random.mtrand.RandomState, int][source]

Set the seed for numpy’s random generator.

Parameters

seed (Optional[int]) –

Returns

Returns a tuple of random state and seed.

Return type

Tuple[RandomState, int]

mtenv.utils.setup_utils module

mtenv.utils.setup_utils.parse_dependency(filepath: pathlib.Path) → List[str][source]

Parse python dependencies from a file.

The list of dependencies is used by setup.py files. Lines starting with “#” are ingored (useful for writing comments). In case the dependnecy is host using git, the url is parsed and modified to make suitable for setup.py files.

Parameters

filepath (Path) –

Returns

List of dependencies

Return type

List[str]

mtenv.utils.types module

Module contents