bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / _external / array_api_extra / _delegation / nunique
function
scipy._external.array_api_extra._delegation:nunique
source: build-install/usr/lib/python3.14/site-packages/scipy/_external/array_api_extra/_delegation.py:830
Signature
def nunique(x: Array, /, xp: ArrayNamespace | None = None) → ArraySummary
Count the number of unique elements in an array.
Extended Summary
Compatible with JAX and Dask, whose laziness would be otherwise problematic.
Parameters
x: ArrayInput array.
xp: array_namespace, optionalThe standard-compatible namespace for
x. Default: infer.
Returns
: array: 0-dimensional integer arrayThe number of unique elements in
x. It can be lazy.
Aliases
scipy.differentiate.xpx.nunique