Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read numpy nans/datetimes #741

Merged
merged 10 commits into from
Sep 25, 2019
5 changes: 2 additions & 3 deletions python/perspective/perspective/src/fill.cpp
Original file line number Diff line number Diff line change
@@ -267,9 +267,8 @@ _fill_col_int64(t_data_accessor accessor, t_data_table& tbl, std::shared_ptr<t_c
}

double fval = item.cast<double>();
bool is_numpy_nan = py::hasattr(item, "real") && py::str(item.attr("real")).cast<std::string>() == "nan";
if (isnan(fval) || is_numpy_nan) {
WARN("Promoting to string");
if (isnan(fval)) {
WARN("Promoting " + name + " to string from int64");
tbl.promote_column(name, DTYPE_STR, i, false);
col = tbl.get_column(name);
_fill_col_string(