Skip to content

Commit

Permalink
Serialize Python floats properly as doubles. (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertnishihara authored and pcmoritz committed Sep 15, 2016
1 parent 5ac2df4 commit d469366
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/src/pynumbuf/adapters/python.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Status append(PyObject* elem, SequenceBuilder& builder,
if (PyBool_Check(elem)) {
RETURN_NOT_OK(builder.AppendBool(elem == Py_True));
} else if (PyFloat_Check(elem)) {
RETURN_NOT_OK(builder.AppendFloat(PyFloat_AS_DOUBLE(elem)));
RETURN_NOT_OK(builder.AppendDouble(PyFloat_AS_DOUBLE(elem)));
} else if (PyLong_Check(elem)) {
int overflow = 0;
int64_t data = PyLong_AsLongLongAndOverflow(elem, &overflow);
Expand Down

0 comments on commit d469366

Please sign in to comment.