You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, and_ and or_ are aliases for add_ and multiply_, respectively (or vice versa, they're duplicative). add_ and multiply_ apply + and * operators, respectively. I'd suggest that and_ and or_ instead apply & and | operators, respectively.
This won't change the result: np.array(bool) * np.array(bool) = np.array(bool), for example. But it would be more explicit, and could improve performance.
The text was updated successfully, but these errors were encountered:
MaxGhenis
changed the title
Change and_, or_ to return bools
Change and_, or_ to use & and | instead of * and + operators
Feb 12, 2022
MaxGhenis
changed the title
Change and_, or_ to use & and | instead of * and + operators
Change and_ and or_ to use & and | instead of * and + operators
Feb 12, 2022
Currently,
and_
andor_
are aliases foradd_
andmultiply_
, respectively (or vice versa, they're duplicative).add_
andmultiply_
apply+
and*
operators, respectively. I'd suggest thatand_
andor_
instead apply&
and|
operators, respectively.This won't change the result:
np.array(bool) * np.array(bool) = np.array(bool)
, for example. But it would be more explicit, and could improve performance.Relevant code:
openfisca-tools/openfisca_tools/model_api.py
Lines 75 to 77 in e2bc593
The text was updated successfully, but these errors were encountered: