Skip to content

Commit 2e4c796

Browse files
committed
actually wrap svd properly
1 parent 924d297 commit 2e4c796

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

array_api_compat/dask/array/_aliases.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,11 @@ def dask_arange(
102102
# Wrap the svd functions to not pass full_matrices to dask
103103
# when full_matrices=False (as that is the defualt behavior for dask),
104104
# and dask doesn't have the full_matrices keyword
105-
_svd = get_xp(da)(_linalg.svd)
106105

107106
def svd(x: Array, full_matrices: bool = True, **kwargs) -> SVDResult:
108107
if full_matrices:
109-
return _svd(x, full_matrices=full_matrices, **kwargs)
110-
return _svd(x, **kwargs)
108+
raise ValueError("full_matrics=True is not supported by dask.")
109+
return da.linalg.svd(x, **kwargs)
111110

112111

113112
def svdvals(x: Array) -> Array:

array_api_compat/dask/array/linalg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
matrix_rank,
2020
matrix_transpose,
2121
qr,
22+
svd,
2223
svdvals,
2324
vecdot,
2425
vector_norm,

0 commit comments

Comments
 (0)