diff options
author | Zackery Spytz <zspytz@gmail.com> | 2020-03-12 02:58:41 -0600 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-03-12 10:01:16 +0100 |
commit | 70b4cc65e2e4f430607dbccbf56c265b438203a1 (patch) | |
tree | cef4918477a159e9964dfefa46c66c4820fcddff | |
parent | cd34c9165adc208961649d7b5b534e0b1deea5e5 (diff) | |
download | cython-70b4cc65e2e4f430607dbccbf56c265b438203a1.tar.gz |
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).
-rw-r--r-- | Cython/Includes/cpython/number.pxd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Cython/Includes/cpython/number.pxd b/Cython/Includes/cpython/number.pxd index 3ad8de59c..ded35c292 100644 --- a/Cython/Includes/cpython/number.pxd +++ b/Cython/Includes/cpython/number.pxd @@ -27,6 +27,13 @@ cdef extern from "Python.h": # failure. This is the equivalent of the Python expression "o1 * # 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) # Return value: New reference. # Returns the result of dividing o1 by o2, or NULL on @@ -133,6 +140,13 @@ cdef extern from "Python.h": # failure. The operation is done in-place when o1 supports # 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) # Return value: New reference. # Returns the result of dividing o1 by o2, or NULL on failure. The |