PolicyEngine / policyengine-core

Core microsimulation engine for PolicyEngine models. Forked from OpenFisca-Core.
https://policyengine.github.io/policyengine-core
GNU Affero General Public License v3.0
14 stars 19 forks source link

Fix newly added enum.py statement to eliminate FutureWarning of deprecation #238

Open martinholmer opened 1 month ago

martinholmer commented 1 month ago

@nikhilwoodruff, a few days ago in commit https://github.com/PolicyEngine/policyengine-core/pull/231/commits/7598d96af1c27855d594ed5575e4979eaf944539 you added this statement:

https://github.com/PolicyEngine/policyengine-core/blob/92e3bb68bcd65c9819c02c89dcd9562f0ca9cc9d/policyengine_core/enums/enum.py#L56-L57

This statement generates a dozen FutureWarnings of a deprecation as described here:

Screenshot 2024-08-07 at 3 22 27 PM

It would be good to fix this before it becomes an error.

MaxGhenis commented 1 month ago

Just involves replacing array[0] with array.iloc[0]?

martinholmer commented 1 month ago

@MaxGhenis said in issue #238:

Just involves replacing array[0] with array.iloc[0]

Yes, I think so. Certainly that shouldn't be too burdensome for @nikhilwoodruff