Skip to content

Commit dce1a6f

Browse files
committed
MAINT: reshape does not accept int
1 parent 84b1f0b commit dce1a6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/array_api_extra/_lib/_funcs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,8 @@ def nunique(x: Array, /, *, xp: ModuleType | None = None) -> Array:
725725
return xp.asarray(n, device=_compat.device(x))
726726

727727
# xp does not have unique_counts; O(n*logn) complexity
728-
x = xp.sort(xp.reshape(x, -1))
728+
x = xp.reshape(x, (-1, ))
729+
x = xp.sort(x)
729730
mask = x != xp.roll(x, -1)
730731
default_int = xp.__array_namespace_info__().default_dtypes(
731732
device=_compat.device(x)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy