Skip to content

Commit 57ee1fe

Browse files
committed
Add complex number support to vecdot
Closes data-apisgh-356 (where the definition x1^H x2 was decided).
1 parent 1229f06 commit 57ee1fe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/API_specification/array_api/linear_algebra_functions.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ def vecdot(x1: array, x2: array, /, *, axis: int = -1) -> array:
9090
Parameters
9191
----------
9292
x1: array
93-
first input array. Should have a real-valued data type.
93+
first input array. Should have a floating-point data type.
9494
x2: array
95-
second input array. Must be compatible with ``x1`` for all non-contracted axes (see :ref:`broadcasting`). The size of the axis over which to compute the dot product must be the same size as the respective axis in ``x1``. Should have a real-valued data type.
95+
second input array. Must be compatible with ``x1`` for all non-contracted axes (see :ref:`broadcasting`). The size of the axis over which to compute the dot product must be the same size as the respective axis in ``x1``. Should have a floating-point data type.
9696
9797
.. note::
9898
The contracted axis (dimension) must not be broadcasted.
@@ -105,6 +105,8 @@ def vecdot(x1: array, x2: array, /, *, axis: int = -1) -> array:
105105
out: array
106106
if ``x1`` and ``x2`` are both one-dimensional arrays, a zero-dimensional containing the dot product; otherwise, a non-zero-dimensional array containing the dot products and having rank ``N-1``, where ``N`` is the rank (number of dimensions) of the shape determined according to :ref:`broadcasting` along the non-contracted axes. The returned array must have a data type determined by :ref:`type-promotion`.
107107
108+
For complex-valued input arrays, this function computes :math:`x_1^H \cdot x_2`.
109+
108110
109111
**Raises**
110112

0 commit comments

Comments
 (0)