---
title: thunder.clang.stack
description: Concatenates the given sequence of tensors in a new (the given) dimension.
canonical: >-
  https://lightning.ai/docs/thunder/stable/api-reference/generated/thunder.clang.stack
---
# thunder.clang.stack {#thunder-clang-stack}

### `thunder.clang.stack(tensors, dim)` {#thunder.clang.stack}

[\[source\]](https://github.com/Lightning-AI/lightning-thunder/blob/0.2.6/thunder/core/langctxs.py#L1056-L1066)

Concatenates the given sequence of tensors in a new (the given) dimension.

Parameters:

*   **tensors** ([_list_](https://docs.python.org/3/builtins/stdtypes.html#list "(in Python v3.15)")_\[_[_thunder.core.proxies.TensorProxy_](/docs/thunder/core/generated/thunder.core.proxies.TensorProxy#thunder.core.proxies.TensorProxy "thunder.core.proxies.TensorProxy")_\]_) –
    
*   **dim** ([_int_](https://docs.python.org/3/builtins/functions.html#int "(in Python v3.15)")) –

---

**Navigation**

- Parent: [Generated](/docs/thunder/0.2.6/api-reference/generated.md)
