From 212536f87ccfdb474a5f32dc54fb563fd6007b8d Mon Sep 17 00:00:00 2001 From: Philipp Moritz Date: Mon, 25 Jul 2016 16:38:17 -0700 Subject: [PATCH] Put documentation into ray-core --- python/src/pynumbuf/numbuf.cc | 36 ++++------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/python/src/pynumbuf/numbuf.cc b/python/src/pynumbuf/numbuf.cc index d95feaf84..b0e4457d3 100644 --- a/python/src/pynumbuf/numbuf.cc +++ b/python/src/pynumbuf/numbuf.cc @@ -40,18 +40,7 @@ static void ArrowCapsule_Destructor(PyObject* capsule) { delete reinterpret_cast*>(PyCapsule_GetPointer(capsule, "arrow")); } -/*! Serializes a Python list into an Arrow array. - - \param args - The argument must be a Python list - - \returns - A bytearray object containing the schema metadata - - The size in bytes the serialized object will occupy in memory - - A Python "arrow" capsule containing the RowBatch -*/ +/* Documented in doc/numbuf.rst in ray-core */ static PyObject* serialize_list(PyObject* self, PyObject* args) { PyObject* value; if (!PyArg_ParseTuple(args, "O", &value)) { @@ -85,15 +74,7 @@ static PyObject* serialize_list(PyObject* self, PyObject* args) { return NULL; } -/*! Serialize an arrow::Array into a buffer. - - \param args - A Python "arrow" capsule containing the arrow::Array and - a python memoryview object the data will be written to - - \return - The arrow metadata offset for the arrow metadata -*/ +/* Documented in doc/numbuf.rst in ray-core */ static PyObject* write_to_buffer(PyObject* self, PyObject* args) { std::shared_ptr* batch; PyObject* memoryview; @@ -110,15 +91,7 @@ static PyObject* write_to_buffer(PyObject* self, PyObject* args) { return PyInt_FromLong(metadata_offset); } -/*! Read serialized data from buffer and produce an arrow capsule - - \param args - A Python memoryview from which data will be loaded, - a Python bytearray containing the metadata and the metadata_offset - - \return - A Python "arrow" capsule containing the arrow RowBatch -*/ +/* Documented in doc/numbuf.rst in ray-core */ static PyObject* read_from_buffer(PyObject* self, PyObject* args) { PyObject* memoryview; PyObject* metadata; @@ -147,8 +120,7 @@ static PyObject* read_from_buffer(PyObject* self, PyObject* args) { "arrow", &ArrowCapsule_Destructor); } -/*! -*/ +/* Documented in doc/numbuf.rst in ray-core */ static PyObject* deserialize_list(PyObject* self, PyObject* args) { std::shared_ptr* data; if (!PyArg_ParseTuple(args, "O&", &PyObjectToArrow, &data)) {