PSLmodels/microdf

RuntimeWarning: invalid value encountered in true_divide

Opened this issue · 0 comments

@martinholmer found that the standard PolicyEngine US tests run on GitHub throw this warning:

policyengine_us/tests/test_variables.py::test_variable[household_income_decile]
policyengine_us/tests/test_variables.py::test_variable[spm_unit_income_decile]  /opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/microdf/generic.py:253: RuntimeWarning: invalid value encountered in true_divide
    ranks /= self.weights.values.sum()

Code:

ranks /= self.weights.values.sum()