We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd381a0 commit 54f4838Copy full SHA for 54f4838
array_api_compat/common/_linalg.py
@@ -77,7 +77,7 @@ def matrix_rank(x: ndarray,
77
# dimensional arrays.
78
if x.ndim < 2:
79
raise xp.linalg.LinAlgError("1-dimensional array given. Array must be at least two-dimensional")
80
- S = get_xp(xp).linalg.svdvals(x, **kwargs)
+ S = get_xp(xp)(svdvals)(x, **kwargs)
81
if rtol is None:
82
tol = S.max(axis=-1, keepdims=True) * max(x.shape[-2:]) * xp.finfo(S.dtype).eps
83
else:
0 commit comments