Running pytest tests --no-cov on PolicyEngine/policyengine.py@joss-paper produces 429 passes and 84 RuntimeWarning: invalid value encountered in divide warnings. All originate from policyengine_us, concentrated in QBI (qualified business income) and labor-supply variables.
These are not test failures, but they create significant noise in the test output and likely indicate division-by-zero in formulas that should be guarded with np.where / np.divide(where=...).
Related but more specific than:
Reproduction:
git clone https://github.com/PolicyEngine/policyengine.py
cd policyengine.py && git checkout joss-paper
pip install -e .
pytest tests --no-cov -W error::RuntimeWarning # to surface them
Reported in the discussion on PolicyEngine/policyengine.py#264.
Running
pytest tests --no-covonPolicyEngine/policyengine.py@joss-paperproduces 429 passes and 84RuntimeWarning: invalid value encountered in dividewarnings. All originate frompolicyengine_us, concentrated in QBI (qualified business income) and labor-supply variables.These are not test failures, but they create significant noise in the test output and likely indicate division-by-zero in formulas that should be guarded with
np.where/np.divide(where=...).Related but more specific than:
np.dividerefactor proposal)Reproduction:
Reported in the discussion on PolicyEngine/policyengine.py#264.