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

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

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

# einsum

[common]\
fun [einsum](einsum.md)(equation: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), operands: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[Tensor](../Tensor/index.md)&gt;): [Tensor](../Tensor/index.md)

`einsum(equation: String, operands: List<Tensor>)`: the `einsum` operator. Einstein-summation contraction from a notation string. `equation` names each operand's axes and (after `->`) the output axes; omitting `->` keeps the once-appearing labels in alphabetical order. One- and two-operand equations are served: one operand reduces and permutes; two operands contract through a single batched matmul.