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

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

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

# tensordot

[common]\
fun [tensordot](tensordot.md)(a: [Tensor](../Tensor/index.md), b: [Tensor](../Tensor/index.md), dimsA: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html), dimsB: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html)): [Tensor](../Tensor/index.md)

`tensordot(a: Tensor, b: Tensor, dimsA: LongArray, dimsB: LongArray)`: the `tensordot` operator. Named-axis contraction: sums `a` over `dims_a` against `b` over `dims_b`, pairwise. `dims_a[i]` on `a` contracts with `dims_b[i]` on `b` (equal list lengths; per-pair sizes must agree). The output is `a`'s non-contracted dims followed by `b`'s.