torch_ecg.utils.str2bool

torch_ecg.utils.str2bool(v: str | bool) bool[source]

Converts a “boolean” value possibly in the format of str to bool.

Modified from [1].

Parameters:

v (str or bool) – The “boolean” value.

Returns:

v in the format of a bool.

Return type:

bool

References