Add MultiplyNumericBoolean primitive that allows for multiplication between a numeric an a boolean column#2035
Conversation
| to_test = [ | ||
| ("numeric", "numeric"), | ||
| ("numeric", "bool"), | ||
| ("bool", "numeric"), |
There was a problem hiding this comment.
We can't swap inputs with the new MultiplyBooleanNumeric primitive like we could with the previous MultiplyNumeric primitive. The first input needs to be the numeric column and the second the boolean column.
Or if you prefer, we could add logic in the primitive to determine which is which based on dtype and act accordingly?
There was a problem hiding this comment.
what if we add logic in the __mul__ override to pass in [numeric, bool] in that order instead of always doing [self, other]?
There was a problem hiding this comment.
That could work. I'll have a look.
There was a problem hiding this comment.
Updated the primitive logic and inputs to handle this case since updating __mul__ could result in two features with the same name.
rwedge
left a comment
There was a problem hiding this comment.
Looks good, assuming tests pass
Codecov Report
@@ Coverage Diff @@
## main #2035 +/- ##
==========================================
- Coverage 99.09% 99.05% -0.04%
==========================================
Files 143 143
Lines 16511 16568 +57
==========================================
+ Hits 16361 16411 +50
- Misses 150 157 +7
Continue to review full report at Codecov.
|
| es = boolean_mult_es | ||
| to_test = [ | ||
| ("numeric", "numeric"), | ||
| ("numeric", "bool"), |
There was a problem hiding this comment.
@rwedge These were removed in the PR with changes to MultiplyNumeric, so had to add them back in now.
Add MultiplyNumericBoolean primitive that allows for multiplication between a numeric an a boolean column
Replaces functionality that is removed in #2022 with a more appropriately named primitive.
Closes #2026