Handle more general numpy object types.

This commit is contained in:
Robert Nishihara
2016-08-30 19:31:04 -07:00
parent 04c28001fc
commit ad12d5fece
+1 -6
View File
@@ -103,7 +103,7 @@ Status SerializeArray(PyArrayObject* array, SequenceBuilder& builder,
case NPY_DOUBLE:
RETURN_NOT_OK(builder.AppendTensor(dims, reinterpret_cast<double*>(data)));
break;
case NPY_OBJECT:
default:
if (!numbuf_serialize_callback) {
std::stringstream stream;
stream << "numpy data type not recognized: " << dtype;
@@ -119,11 +119,6 @@ Status SerializeArray(PyArrayObject* array, SequenceBuilder& builder,
subdicts.push_back(result);
Py_XDECREF(arglist);
}
break;
default:
std::stringstream stream;
stream << "numpy data type not recognized: " << dtype;
return Status::NotImplemented(stream.str());
}
Py_XDECREF(contiguous);
return Status::OK();