diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/binaryop.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/binaryop.rst new file mode 100644 index 00000000000..e5bc6aa7cda --- /dev/null +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/binaryop.rst @@ -0,0 +1,6 @@ +======== +binaryop +======== + +.. automodule:: cudf._lib.pylibcudf.binaryop + :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/index.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/index.rst index 435278afeeb..7504295de92 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/index.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/index.rst @@ -8,6 +8,7 @@ This page provides API documentation for pylibcudf. :maxdepth: 1 :caption: API Documentation + binaryop column copying gpumemoryview diff --git a/python/cudf/cudf/_lib/pylibcudf/binaryop.pyx b/python/cudf/cudf/_lib/pylibcudf/binaryop.pyx index 0697a2a1079..af248ba2071 100644 --- a/python/cudf/cudf/_lib/pylibcudf/binaryop.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/binaryop.pyx @@ -23,6 +23,31 @@ cpdef Column binary_operation( binary_operator op, DataType data_type ): + """Perform a binary operation between a column and another column or scalar. + + Either ``lhs`` or ``rhs`` must be a + :py:class:`~cudf._lib.pylibcudf.column.Column`. The other may be a + :py:class:`~cudf._lib.pylibcudf.column.Column` or a + :py:class:`~cudf._lib.pylibcudf.scalar.Scalar`. + + For details, see :cpp:func:`binary_operation`. + + Parameters + ---------- + lhs : Column or Scalar + The left hand side argument. + rhs : Column or Scalar + The right hand side argument. + op : BinaryOperator + The operation to perform. + data_type : DataType + The output to use for the output. + + Returns + ------- + pylibcudf.Column + The result of the binary operation + """ cdef unique_ptr[column] result if isinstance(lhs, Column) and isinstance(rhs, Column):