UCL-CCS/EasyVVUQ

Unhandled divide by zero case in sc_analysis.py

Opened this issue · 0 comments

Test suite raises warning for invalid value encountered in divide e.g:

tests/test_dimension_adaptive_SC.py::test_look_ahead
tests/test_dimension_adaptive_SC.py::test_adapt_dimension
tests/test_dimension_adaptive_SC.py::test_SC2PCE
tests/test_dimension_adaptive_SC.py::test_comb_coef
tests/test_dimension_adaptive_SC.py::test_error
tests/test_dimension_adaptive_SC.py::test_results
  /home/runner/work/EasyVVUQ/EasyVVUQ/easyvvuq/analysis/sc_analysis.py:1128: RuntimeWarning: invalid value encountered in divide
    S_u[u] = D_u[u] / D

Maybe solution is to improve the case handling of situation where D=0 in the analysis script.

Possibly for @wedeling