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

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

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

# oneHot

[common]\
fun [oneHot](oneHot.md)(indices: [Tensor](../Tensor/index.md), numClasses: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)): [Tensor](../Tensor/index.md)

`oneHot(indices: Tensor, numClasses: Long)`: the `one_hot` operator. Expands an integer index tensor into a trailing one-hot dimension.