Utils
Functions
check_make_dirs(paths, verbose=True, isdir=False)
Create base directories for given paths if they do not exist.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
paths |
Union[str, List[str]]
|
A path or list of paths for which to check the basedirectories |
required |
verbose |
bool
|
Whether to log the output path |
True
|
isdir |
bool
|
Treats given path(s) as diretory instead of only checking the basedir. |
False
|
Source code in src/utils.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
get_logger(name=__name__, log_level=logging.INFO, log_file=None)
Initializes command line logger.
Source code in src/utils.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
make_delayed(signal, delays, circpad=False)
Create delayed versions of the 2-D signal.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
signal |
ndarray
|
2-D array of shape (n_samples, n_features) |
required |
delays |
ndarray
|
1-D array of delays to apply to the signal can be positive or negative; negative values advance the signal (shifting it backward) |
required |
circpad |
bool
|
If True, use circular padding for delays If False, use zero padding for delays |
False
|
Returns:
Type | Description |
---|---|
ndarray
|
2-D array of shape (n_samples, n_features * n_delays) |
Source code in src/utils.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|