This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / _core / einsumfunc / bmm_einsum

function

numpy._core.einsumfunc:bmm_einsum

source: build-install/usr/lib/python3.14/site-packages/numpy/_core/einsumfunc.py :1146

Signature

def   bmm_einsum ( eq a b out = None ** kwargs )

Summary

Perform arbitrary pairwise einsums using only matmul, or multiply if no contracted indices are involved (plus maybe single term einsum to prepare the terms individually). The logic for each is cached based on the equation and array shape, and each step is only performed if necessary.

Parameters

eq : str

The einsum equation.

a : array_like

The first array to contract.

b : array_like

The second array to contract.

Returns

: array_like

Notes

A fuller description of this algorithm, and original source for this implementation, can be found at https://github.com/jcmgray/einsum_bmm.

Aliases

  • numpy._core.einsumfunc.bmm_einsum