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

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

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

# flip

[common]\
fun [flip](flip.md)(input: [Tensor](../Tensor/index.md), dims: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html)): [Tensor](../Tensor/index.md)

`flip(input: Tensor, dims: LongArray)`: the `flip` operator. Reverse the element order along each dim in `dims`. Always copies; a reversed layout is not expressible as a view in this runtime, so this op never returns one.