Skip to content

Commit d469366

Browse files
robertnishiharapcmoritz
authored andcommitted
Serialize Python floats properly as doubles. (#14)
1 parent 5ac2df4 commit d469366

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/src/pynumbuf/adapters/python.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Status append(PyObject* elem, SequenceBuilder& builder,
6464
if (PyBool_Check(elem)) {
6565
RETURN_NOT_OK(builder.AppendBool(elem == Py_True));
6666
} else if (PyFloat_Check(elem)) {
67-
RETURN_NOT_OK(builder.AppendFloat(PyFloat_AS_DOUBLE(elem)));
67+
RETURN_NOT_OK(builder.AppendDouble(PyFloat_AS_DOUBLE(elem)));
6868
} else if (PyLong_Check(elem)) {
6969
int overflow = 0;
7070
int64_t data = PyLong_AsLongLongAndOverflow(elem, &overflow);

0 commit comments

Comments
 (0)