PolicyEngine / PolicyEngine/policyengine-us
Replace `np.any` calls with `aggr`/`add`
Open
code-health
- Dominant language
- Python
- Stars
- 162
- Forks
- 212
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 97
Description
For example, this:
https://github.com/PolicyEngine/openfisca-us/blob/2605343194d36cc319aa52511c797c927cb759b3/openfisca_us/variables/fcc/acp/is_acp_eligible.py#L13-L21
can be replaced with
```python
def formula(spm_unit, period, parameters):
fcc = parameters(period).fcc
categorically_eligible = aggr(spm_unit, period, fcc.acp.categorical_eligibility)
```
`np.any` is called similarly in a few places where this pattern could simplify the code.
Contributor guide
Assessment
This issue has not been assessed yet.