Skip to content

Commit

Permalink
Add docs for binaryop
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Jan 22, 2024
1 parent 65a2810 commit a948a55
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/cudf/source/user_guide/api_docs/pylibcudf/binaryop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
========
binaryop
========

.. automodule:: cudf._lib.pylibcudf.binaryop
:members:
1 change: 1 addition & 0 deletions docs/cudf/source/user_guide/api_docs/pylibcudf/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This page provides API documentation for pylibcudf.
:maxdepth: 1
:caption: API Documentation

binaryop
column
copying
gpumemoryview
Expand Down
25 changes: 25 additions & 0 deletions python/cudf/cudf/_lib/pylibcudf/binaryop.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit a948a55

Please sign in to comment.