Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit 9eb76e1

Browse files
committed
Compute before mean because of dask/dask#7169
1 parent 1aef26e commit 9eb76e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

diffxpy/testing/det.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,10 @@ def _ave(self):
791791
792792
:return: np.ndarray
793793
"""
794-
return np.asarray(self.x.mean(axis=0)).flatten()
794+
x = self.x
795+
if isinstance(x, dask.array.core.Array):
796+
x = x.compute()
797+
return np.asarray(x.mean(axis=0)).flatten()
795798

796799
def _test(self):
797800
"""

0 commit comments

Comments
 (0)