Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/257.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix `AttributeError` in `cps.marriage_tax_reforms` when reform was instantiated with `child_education_levels` — replace nonexistent `np.is_in` (typo) with `np.isin`.
4 changes: 2 additions & 2 deletions policyengine_uk/reforms/cps/marriage_tax_reforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def formula(person, period):
child_meets_age_condition = person("age", period) <= max_child_age
return benunit.any(child_meets_age_condition)
if child_education_levels is not None:
child_meets_education_condition = np.is_in(
child_meets_education_condition = np.isin(
person("education_level", period).decode_to_str(),
child_education_levels,
)
Expand Down Expand Up @@ -110,7 +110,7 @@ def formula(person, period):
child_meets_age_condition = person("age", period) <= max_child_age
return benunit.any(child_meets_age_condition)
if child_education_levels is not None:
child_meets_education_condition = np.is_in(
child_meets_education_condition = np.isin(
person("education_level", period).decode_to_str(),
child_education_levels,
)
Expand Down
Loading