torch_ecg.utils.str2bool

torch_ecg.utils.str2bool(v: Union[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

1

https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse