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

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

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

# bucketize

[common]\
fun [bucketize](bucketize.md)(input: [Tensor](../Tensor/index.md), boundaries: [Tensor](../Tensor/index.md), outInt32: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false, right: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false): [Tensor](../Tensor/index.md)

`bucketize(input: Tensor, boundaries: Tensor, outInt32: Boolean = false, right: Boolean = false)`: the `bucketize` operator. Bucket index of each `input` element against a sorted 1-D `boundaries`. With `right == false` (default) an element in `[b[i-1], b[i])` maps to bucket `i`; `right == true` uses `(b[i-1], b[i]]`. Output shape mirrors `input`.