Skip to content

Commit 61b6ccd

Browse files
committed
Undo hack to test dask shape
1 parent f059874 commit 61b6ccd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/array_api_extra/_lib/_funcs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# https://github.com/scikit-learn/scikit-learn/pull/27910#issuecomment-2568023972
44
from __future__ import annotations
55

6-
import math
76
import warnings
87
from collections.abc import Sequence
98
from types import ModuleType
@@ -484,7 +483,7 @@ def nunique(x: Array, /, *, xp: ModuleType | None = None) -> Array:
484483
_, counts = xp.unique_counts(x)
485484
n = _compat.size(counts)
486485
# FIXME https://github.com/data-apis/array-api-compat/pull/231
487-
if n is None or math.isnan(n): # e.g. Dask, ndonnx
486+
if n is None: # e.g. Dask, ndonnx
488487
return xp.astype(counts, xp.bool).sum()
489488
return xp.asarray(n, device=_compat.device(x))
490489

0 commit comments

Comments
 (0)