Skip to content

Commit b339fe9

Browse files
committed
updates based on feedback
1 parent cf4d08d commit b339fe9

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

docs/api/math/isna.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
Input columns.
1414

1515
return: FExpr
16-
f-expression that returns `0` for valid elements and `1` otherwise. All the resulting columns will have `bool8` stypes and as many rows/columns as there are in `cols`.
16+
f-expression that returns `0` for valid elements and `1` otherwise.
17+
All the resulting columns will have `bool8` stypes
18+
and as many rows/columns as there are in `cols`.
1719

1820
Examples
1921
--------

src/core/expr/fbinary/fexpr__eq__.cc

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,9 @@ Column FExpr__eq__::evaluate1(Column&& lcol, Column&& rcol) const {
6767
if (type1.is_void()) {
6868
std::swap(lcol, rcol);
6969
}
70-
switch (type0.stype()) {
71-
case SType::VOID:
72-
return Const_ColumnImpl::make_bool_column(lcol.nrows(), true);
73-
default:
74-
return Column(new Isna_ColumnImpl(std::move(lcol)));
75-
}
70+
if (type0.stype() == SType::VOID) {
71+
return Const_ColumnImpl::make_bool_column(lcol.nrows(), true);
72+
} else return Column(new Isna_ColumnImpl(std::move(lcol)));
7673
} else {
7774
switch (type0.stype()) {
7875
case SType::BOOL:
@@ -93,9 +90,6 @@ Column FExpr__eq__::evaluate1(Column&& lcol, Column&& rcol) const {
9390
"types `" << type1 << "` and `" << type2 << "`";
9491
}
9592

93+
}} // namespace dt::expr
9694

9795

98-
99-
100-
101-
}} // namespace dt::expr

tests/test-f.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,4 +502,5 @@ def test_codes():
502502
def test_isna():
503503
assert str(dt.math.isna(f.A)) == str(f.A.math_isna())
504504
DT = dt.Frame(A = [None, 9, 8, 2, 3, None, None, 3, 0, 5, 5, 8, None])
505-
assert_equals (DT[:, dt.math.isna(f.A)], DT[:, f.A.math_isna()])
505+
assert_equals (DT[:, dt.math.isna(f.A)], DT[:, f.A.math_isna()])
506+

0 commit comments

Comments
 (0)