| Server IP : 217.160.0.135 / Your IP : 216.73.217.25 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/numpy/core/__pycache__/ |
Upload File : |
�
���c�� � � � d Z ddlZddlZddlmZ ddlmZmZ ddlm Z ddgZ
dZ ee� � Z
d � Zd
� Zd� Zd� Zd
� Zd� Zd� Zd� Zd� Zddd�d�Z e ed�� � ddd�d�� � Zddd�d�Z e ed�� � ddd�d�� � ZdS )z&
Implementation of optimized einsum.
� N)�c_einsum)�
asanyarray� tensordot)�array_function_dispatch�einsum�einsum_path�4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZc �` � t | |� � }t d|dz
� � }|r|dz
}||z S )a�
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})
30
>>> _flop_count('abc', True, 2, {'a': 2, 'b':3, 'c':5})
60
� )�_compute_size_by_dict�max)�idx_contraction�inner� num_terms�size_dictionary�overall_size� op_factors �7/usr/lib/python3/dist-packages/numpy/core/einsumfunc.py�_flop_countr sB � �>