Skip to content

Commit 67890c5

Browse files
committed
fix fexpr.cc
1 parent 21226cc commit 67890c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/expr/fexpr.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,8 @@ DECLARE_METHOD(&PyFExpr::min)
534534

535535
oobj PyFExpr::nth(const XArgs& args) {
536536
auto nthFn = oobj::import("datatable", "nth");
537-
auto n = args[1].to<py::oobj>(py::oint(0));
537+
oobj n = args[0].to_oobj() ? args[0].to_oobj()
538+
: py::oint(0);
538539
oobj skipna = args[1].to_oobj_or_none();
539540
return nthFn.call({this, n, skipna});
540541
}

0 commit comments

Comments
 (0)