Skip to content

Commit 5283bee

Browse files
authored
Add complex number support to linalg.matrix_power (#549)
1 parent 61694d0 commit 5283bee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: spec/API_specification/array_api/linalg.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,14 @@ def matrix_power(x: array, n: int, /) -> array:
261261
Parameters
262262
----------
263263
x: array
264-
input array having shape ``(..., M, M)`` and whose innermost two dimensions form square matrices. Should have a real-valued floating-point data type.
264+
input array having shape ``(..., M, M)`` and whose innermost two dimensions form square matrices. Should have a floating-point data type.
265265
n: int
266266
integer exponent.
267267
268268
Returns
269269
-------
270270
out: array
271-
if ``n`` is equal to zero, an array containing the identity matrix for each square matrix. If ``n`` is less than zero, an array containing the inverse of each square matrix raised to the absolute value of ``n``, provided that each square matrix is invertible. If ``n`` is greater than zero, an array containing the result of raising each square matrix to the power ``n``. The returned array must have the same shape as ``x`` and a real-valued floating-point data type determined by :ref:`type-promotion`.
271+
if ``n`` is equal to zero, an array containing the identity matrix for each square matrix. If ``n`` is less than zero, an array containing the inverse of each square matrix raised to the absolute value of ``n``, provided that each square matrix is invertible. If ``n`` is greater than zero, an array containing the result of raising each square matrix to the power ``n``. The returned array must have the same shape as ``x`` and a floating-point data type determined by :ref:`type-promotion`.
272272
"""
273273

274274
def matrix_rank(x: array, /, *, rtol: Optional[Union[float, array]] = None) -> array:

0 commit comments

Comments
 (0)