Commit bd990e4a authored by Zackery Spytz's avatar Zackery Spytz Committed by GitHub

Add missing declarations to number.pxd (GH-3421)

PyNumber_MatrixMultiply() and PyNumber_InPlaceMatrixMultiply() were
missing from number.pxd.

The comments are taken from the C API documentation
(https://docs.python.org/3.8/c-api/number.html).
parent 22213aa3
...@@ -27,6 +27,13 @@ cdef extern from "Python.h": ...@@ -27,6 +27,13 @@ cdef extern from "Python.h":
# failure. This is the equivalent of the Python expression "o1 * # failure. This is the equivalent of the Python expression "o1 *
# o2". # o2".
object PyNumber_MatrixMultiply(object o1, object o2)
# Return value: New reference.
# Returns the result of matrix multiplication on o1 and o2, or
# NULL on failure. This is the equivalent of the Python
# expression "o1 @ o2".
# New in version 3.5.
object PyNumber_Divide(object o1, object o2) object PyNumber_Divide(object o1, object o2)
# Return value: New reference. # Return value: New reference.
# Returns the result of dividing o1 by o2, or NULL on # Returns the result of dividing o1 by o2, or NULL on
...@@ -133,6 +140,13 @@ cdef extern from "Python.h": ...@@ -133,6 +140,13 @@ cdef extern from "Python.h":
# failure. The operation is done in-place when o1 supports # failure. The operation is done in-place when o1 supports
# it. This is the equivalent of the Python statement "o1 *= o2". # it. This is the equivalent of the Python statement "o1 *= o2".
object PyNumber_InPlaceMatrixMultiply(object o1, object o2)
# Return value: New reference.
# Returns the result of matrix multiplication on o1 and o2, or
# NULL on failure. The operation is done in-place when o1 supports
# it. This is the equivalent of the Python statement "o1 @= o2".
# New in version 3.5.
object PyNumber_InPlaceDivide(object o1, object o2) object PyNumber_InPlaceDivide(object o1, object o2)
# Return value: New reference. # Return value: New reference.
# Returns the result of dividing o1 by o2, or NULL on failure. The # Returns the result of dividing o1 by o2, or NULL on failure. The
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment