Utils¶
ecopann.utils¶
- class ecopann.utils.Logger(path='logs', fileName='log', stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)[source]¶
Bases:
objectRecord the output of the terminal and write it to disk.
- ecopann.utils.makeList(roots)[source]¶
Checks if the given parameter is a list. If not, creates a list with the parameter as an item in it.
- ecopann.utils.mkdir(path)[source]¶
Make a directory in a particular location if it is not exists, otherwise, do nothing.
- Parameters
path (str) – The path of a file.
Examples
>>> mkdir('/home/UserName/test') >>> mkdir('test/one') >>> mkdir('../test/one')
- ecopann.utils.saveTorchPt(path, FileName, File)[source]¶
Save the .pt files using
torch.save()funtion.
ecopann.coplot¶
CoPlot is a personal plotting library inserted into ecopann, which can plot contours from the ANN chain. The code coplot is available for free from GitHub and can be installed independently.