Bug Report
Location: pyhealth/metrics/calibration.py
Issue:
When running tests, Python emits SyntaxWarnings about invalid escape sequences in the docstrings of:
- ece_confidence_multiclass() (line 102)
- ece_confidence_binary() (line 135)
Warning message:
SyntaxWarning: invalid escape sequence "\c"
Root cause:
The docstrings contain LaTeX math notation with backslashes (e.g., \frac, \cdot) but use regular strings instead of raw strings r"""", causing Python to interpret \c as an invalid escape sequence.
Suggested fix:
Change docstrings to raw strings by prefixing with r
Testing:
python -W error::SyntaxWarning -c "import pyhealth.metrics.calibration"
Labels: bug, documentation
Bug Report
Location: pyhealth/metrics/calibration.py
Issue:
When running tests, Python emits SyntaxWarnings about invalid escape sequences in the docstrings of:
Warning message:
SyntaxWarning: invalid escape sequence "\c"
Root cause:
The docstrings contain LaTeX math notation with backslashes (e.g., \frac, \cdot) but use regular strings instead of raw strings r"""", causing Python to interpret \c as an invalid escape sequence.
Suggested fix:
Change docstrings to raw strings by prefixing with r
Testing:
python -W error::SyntaxWarning -c "import pyhealth.metrics.calibration"
Labels: bug, documentation