Note that in general the practice of importing * from a module or package is frowned upon, since it often causes poorly readable code. However, it is okay to use it to save typing in interactive sessions.
Hey thanks for noting - for any suggestions regarding code refactoring/organization, please feel free to open a PR. Any contribution to improving the code base is always welcome : )
We patrolled your repo and found the following:
https://github.com/mahmoodlab/CLAM/blob/9482cbc72df522087cfbaa3e6b52da5207a7980a/utils/core_utils.py#L3
As the official Python documentation states:
In your case,
device
is star imported and used without any hint of origin: https://github.com/mahmoodlab/CLAM/blob/9482cbc72df522087cfbaa3e6b52da5207a7980a/utils/core_utils.py#L118In other cases,
device
is overwritten in some of the functions: https://github.com/mahmoodlab/CLAM/blob/9482cbc72df522087cfbaa3e6b52da5207a7980a/utils/core_utils.py#L222