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

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

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

# stack

[common]\
fun [stack](stack.md)(tensors: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[Tensor](../Tensor/index.md)&gt;, dim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0): [Tensor](../Tensor/index.md)

`stack(tensors: List<Tensor>, dim: Long = 0L)`: the `stack` operator. Join tensors along a NEW dim at position `dim`: all inputs share one shape; output rank = input rank + 1, the new dim sized N. Copies.