{ } Raw JSON

bundles / numpy 2.4.4 / numpy / _core / einsumfunc / _flop_count

function

numpy._core.einsumfunc:_flop_count

source: /numpy/_core/einsumfunc.py :23

Signature

def   _flop_count ( idx_contraction inner num_terms size_dictionary )

Summary

Computes the number of FLOPS in the contraction.

Parameters

idx_contraction : iterable

The indices involved in the contraction

inner : bool

Does this contraction require an inner product?

num_terms : int

The number of terms in a contraction

size_dictionary : dict

The size of each of the indices in idx_contraction

Returns

flop_count : int

The total number of FLOPS required for the contraction.

Examples

_flop_count('abc', False, 1, {'a': 2, 'b':3, 'c':5})
_flop_count('abc', True, 2, {'a': 2, 'b':3, 'c':5})

Aliases

  • numpy._core.einsumfunc._flop_count