This is an automated email from the ASF dual-hosted git repository.
rok pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 0b70b0d5964 GH-55653: [Python][Docs] Correction for operator list of
Array/Scalar (#55654)
0b70b0d5964 is described below
commit 0b70b0d596409f3ad8e67c16142b384e4fbe9006
Author: tadeja <[email protected]>
AuthorDate: Tue Nov 17 18:42:19 2026 +0100
GH-55653: [Python][Docs] Correction for operator list of Array/Scalar
(#55654)
### Rationale for this change
Fixes #55653. Docstring correction - replacing the non-implemented Python
arithmetic operator `%` with the missing`*`.
### What changes are included in this PR?
Docstring correction in `array.pxi` and `scalar.pxi` and `compute.rst`
### Are these changes tested?
Yes
### Are there any user-facing changes?
No other than docs correction
### Was AI used for this PR?
In accordance to the [AI generation
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
please disclose below whether and how AI was used in this PR.
**PR code and description written by:**
- [x] Human
- [ ] AI
**Reviewed before submission by:**
- [x] Human
- [ ] AI
- [ ] Not reviewed
* GitHub Issue: #55653
Authored-by: Tadeja Kadunc <[email protected]>
Signed-off-by: Rok Mihevc <[email protected]>
---
docs/source/python/compute.rst | 2 +-
python/pyarrow/array.pxi | 2 +-
python/pyarrow/scalar.pxi | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/source/python/compute.rst b/docs/source/python/compute.rst
index 324959fb001..ef12e31a67d 100644
--- a/docs/source/python/compute.rst
+++ b/docs/source/python/compute.rst
@@ -519,7 +519,7 @@ Standard Python Operators
PyArrow supports standard Python operators for element-wise operations for
arrays and scalars.
Currently, the support is limited to some of the standard compute functions,
i.e.
-arithmetic (``+``, ``-``, ``/``, ``%``, ``**``),
+arithmetic (``+``, ``-``, ``*``, ``/``, ``**``),
bitwise (``&``, ``|``, ``^``, ``>>``, ``<<``) and others.
The aforementioned operators use checked version of underlying kernels
wherever possible
diff --git a/python/pyarrow/array.pxi b/python/pyarrow/array.pxi
index 239d968f69e..c4862df5978 100644
--- a/python/pyarrow/array.pxi
+++ b/python/pyarrow/array.pxi
@@ -199,7 +199,7 @@ def array(object obj, type=None, mask=None, size=None,
from_pandas=None,
explicit index type will not be demoted even if it is wider than required.
This class supports Python's standard operators
- for element-wise operations, i.e. arithmetic (`+`, `-`, `/`, `%`, `**`),
+ for element-wise operations, i.e. arithmetic (`+`, `-`, `*`, `/`, `**`),
bitwise (`&`, `|`, `^`, `>>`, `<<`) and others.
They can be used directly instead of calling underlying
`pyarrow.compute` functions explicitly.
diff --git a/python/pyarrow/scalar.pxi b/python/pyarrow/scalar.pxi
index f96fb40572b..b6d6a5a1eaa 100644
--- a/python/pyarrow/scalar.pxi
+++ b/python/pyarrow/scalar.pxi
@@ -28,7 +28,7 @@ cdef class Scalar(_Weakrefable):
Notes
-----
This class supports Python's standard operators
- for element-wise operations, i.e. arithmetic (`+`, `-`, `/`, `%`, `**`),
+ for element-wise operations, i.e. arithmetic (`+`, `-`, `*`, `/`, `**`),
bitwise (`&`, `|`, `^`, `>>`, `<<`) and others.
They can be used directly instead of calling underlying
`pyarrow.compute` functions explicitly.