array-api
array-api copied to clipboard
RFC: add bincount
It seems quite widely adopted:
- https://numpy.org/doc/stable/reference/generated/numpy.bincount.html
- https://pytorch.org/docs/stable/generated/torch.bincount.html
- https://docs.cupy.dev/en/stable/reference/generated/cupy.bincount.html
- https://jax.readthedocs.io/en/latest/_autosummary/jax.numpy.bincount.html
- https://docs.dask.org/en/stable/generated/dask.array.bincount.html
Although I have not checked how compatible they are.
JAX in particular requires an extra length
argument to statically define the length of the output array to make JIT possible and dask uses (nan,)
shape to represent a data-dependent output shapes.