fcapy.utils.utils
This module provides a set of functions which can be useful in any subpackage of fcapy package
Functions
|
Return kwargs which are parameters of func |
|
|
|
|
|
A decorator to used instead of basic tqdm. |
|
Slice python list lst by any slicer |
Return unique columns of sparse scipy matrix |
- fcapy.utils.utils.get_kwargs_used(kwargs, func)
Return kwargs which are parameters of func
- fcapy.utils.utils.powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)
- fcapy.utils.utils.safe_tqdm(*args, **kwargs)
A decorator to used instead of basic tqdm. Does not raise any error if tqdm package is not installed
- fcapy.utils.utils.slice_list(lst: list, slicer)
Slice python list lst by any slicer
- fcapy.utils.utils.sparse_unique_columns(M)
Return unique columns of sparse scipy matrix
MSincerely copy-pasted from https://stackoverflow.com/questions/50419778/unique-column-of-a-sparse-matrix-in-python