---
title: "bincount"
sidebar_label: "bincount"
description: "Kotlin binding reference: bincount."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[bincount](bincount.md)

# bincount

[common]\
fun [bincount](bincount.md)(input: [Tensor](../Tensor/index.md), weights: [Tensor](../Tensor/index.md)? = null, minlength: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0): [Tensor](../Tensor/index.md)

`bincount(input: Tensor, weights: Tensor? = null, minlength: Long = 0L)`: the `bincount` operator. Occurrence count (or weight sum) of each non-negative integer value. The output is 1-D with length `max(x) + 1`, floored at `minlength`; entry `i` counts how often `i` occurs (with `weights` bound, it sums the weights at those positions instead).