iza-institute-of-labor-economics / gettsim

The GErman Taxes and Transfers SIMulator
https://gettsim.readthedocs.io/
GNU Affero General Public License v3.0
57 stars 33 forks source link

BUG: Scalar instead of list returned if function inputs are parameters only #666

Open MImmesberger opened 1 year ago

MImmesberger commented 1 year ago

Bug description

The bug was discovered and discussed in #645

GETTSIM returns something like

{'ges_rente_arbeitsl_vorzeitig': array(60.)}

instead of

{'ges_rente_arbeitsl_vorzeitig': array([60.])}

resulting in a pandas ValueError: If using all scalar values, you must pass an index. This occurred in #645 when functions had a parameter dict as an input (and nothing more) and is resolved once any other input is added.

Once this issue is resolved, we should remove the fake dependencies marked with ToDo: Remove fake dependency (geburtsjahr). in the docstrings.

MImmesberger commented 10 months ago

Issue also occurs when testing for the Minijob threshold in #680.

hmgaudecker commented 6 months ago

Could it be enough to just work with skip_vectorization?

MImmesberger commented 3 months ago

No, same error message as reported here. I didn't investigate further.