ó
    Û“,jÒ  ã                   ó   • S r SS jrg)a  
Copyright (c) 2005-2017, NumPy Developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above
       copyright notice, this list of conditions and the following
       disclaimer in the documentation and/or other materials provided
       with the distribution.

    * Neither the name of the NumPy Developers nor the names of any
       contributors may be used to endorse or promote products derived
       from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
c                 óÊ  •  [        U5        Uu  p4 [        U5      n[        U5      n [        U5      n[        U5      n[        U 5      [        U5      pU R                  nU R                  nUR                  n	UR                  n
SnXV:w  a  SnOP[        U5       HA  nXsU      X”U      :w  a  Sn  O.X<   S:  a  X<==   U-  ss'   XL   S:  d  M5  XL==   U
-  ss'   MC     U(       d  [        S5      e[        U5       Vs/ s H  oÌU;  d  M
  UPM     nnXÓ-   nSnU H
  nX÷U   -  nM     SU4nU Vs/ s H  nUU   PM
     nn[        U
5       Vs/ s H  oÌU;  d  M
  UPM     nnXM-   nSnU H
  nXùU   -  nM     US4nU Vs/ s H  nU	U   PM
     nnU R                  U5      R                  U5      nUR                  U5      R                  U5      n[        UU5      nUR                  UU-   5      $ !   [        [        U* S5      5      n[        [        SU5      5      n GN= f! [         a	    U/nSn GNf = f! [         a	    U/nSn GNf = fs  snf s  snf s  snf s  snf )aW  
Compute tensor dot product along specified axes for arrays >= 1-D.

Given two tensors (arrays of dimension greater than or equal to one),
`a` and `b`, and an array_like object containing two array_like
objects, ``(a_axes, b_axes)``, sum the products of `a`'s and `b`'s
elements (components) over the axes specified by ``a_axes`` and
``b_axes``. The third argument can be a single non-negative
integer_like scalar, ``N``; if it is such, then the last ``N``
dimensions of `a` and the first ``N`` dimensions of `b` are summed
over.

Parameters
----------
a, b : array_like, len(shape) >= 1
    Tensors to "dot".

axes : int or (2,) array_like
    * integer_like
      If an int N, sum over the last N axes of `a` and the first N axes
      of `b` in order. The sizes of the corresponding axes must match.
    * (2,) array_like
      Or, a list of axes to be summed over, first sequence applying to `a`,
      second to `b`. Both elements array_like must be of the same length.

See Also
--------
dot, einsum

Notes
-----
Three common use cases are:
    * ``axes = 0`` : tensor product :math:`a\otimes b`
    * ``axes = 1`` : tensor dot product :math:`a\cdot b`
    * ``axes = 2`` : (default) tensor double contraction :math:`a:b`

When `axes` is integer_like, the sequence for evaluation will be: first
the -Nth axis in `a` and 0th axis in `b`, and the -1th axis in `a` and
Nth axis in `b` last.

When there is more than one axis to sum over - and they are not the last
(first) axes of `a` (`b`) - the argument `axes` should consist of
two sequences of the same length, with the first axis to sum over given
first in both sequences, the second axis second, and so forth.

Examples
--------
A "traditional" example:

>>> a = np.arange(60.).reshape(3,4,5)
>>> b = np.arange(24.).reshape(4,3,2)
>>> c = np.tensordot(a,b, axes=([1,0],[0,1]))
>>> c.shape
(5, 2)
>>> c
array([[ 4400.,  4730.],
       [ 4532.,  4874.],
       [ 4664.,  5018.],
       [ 4796.,  5162.],
       [ 4928.,  5306.]])
>>> # A slower but equivalent way of computing the same...
>>> d = np.zeros((5,2))
>>> for i in range(5):
...   for j in range(2):
...     for k in range(3):
...       for n in range(4):
...         d[i,j] += a[k,n,i] * b[n,k,j]
>>> c == d
array([[ True,  True],
       [ True,  True],
       [ True,  True],
       [ True,  True],
       [ True,  True]], dtype=bool)

An extended example taking advantage of the overloading of + and \*:

>>> a = np.array(range(1, 9))
>>> a.shape = (2, 2, 2)
>>> A = np.array(('a', 'b', 'c', 'd'), dtype=object)
>>> A.shape = (2, 2)
>>> a; A
array([[[1, 2],
        [3, 4]],
       [[5, 6],
        [7, 8]]])
array([[a, b],
       [c, d]], dtype=object)

>>> np.tensordot(a, A) # third argument default is 2 for double-contraction
array([abbcccdddd, aaaaabbbbbbcccccccdddddddd], dtype=object)

>>> np.tensordot(a, A, 1)
array([[[acc, bdd],
        [aaacccc, bbbdddd]],
       [[aaaaacccccc, bbbbbdddddd],
        [aaaaaaacccccccc, bbbbbbbdddddddd]]], dtype=object)

>>> np.tensordot(a, A, 0) # tensor product (result too long to incl.)
array([[[[[a, b],
          [c, d]],
          ...

>>> np.tensordot(a, A, (0, 1))
array([[[abbbbb, cddddd],
        [aabbbbbb, ccdddddd]],
       [[aaabbbbbbb, cccddddddd],
        [aaaabbbbbbbb, ccccdddddddd]]], dtype=object)

>>> np.tensordot(a, A, (2, 1))
array([[[abb, cdd],
        [aaabbbb, cccdddd]],
       [[aaaaabbbbbb, cccccdddddd],
        [aaaaaaabbbbbbbb, cccccccdddddddd]]], dtype=object)

>>> np.tensordot(a, A, ((0, 1), (0, 1)))
array([abbbcccccddddddd, aabbbbccccccdddddddd], dtype=object)

>>> np.tensordot(a, A, ((2, 1), (1, 0)))
array([acccbbdddd, aaaaacccccccbbbbbbdddddddd], dtype=object)

é    é   TFzshape-mismatch for suméÿÿÿÿ)ÚiterÚlistÚrangeÚlenÚ	TypeErrorÚasarrayÚshapeÚndimÚ
ValueErrorÚ	transposeÚreshapeÚdot)ÚaÚbÚaxesÚaxes_aÚaxes_bÚnaÚnbÚas_ÚndaÚbsÚndbÚequalÚkÚnotinÚ	newaxes_aÚN2ÚaxisÚ
newshape_aÚoldaÚ	newaxes_bÚ
newshape_bÚoldbÚatÚbtÚress                            Ú¡C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\chumpy/np_tensordot.pyÚ	tensordotr,   -   sp  € ðtÜˆTŒ
ð
 ‰ˆðÜ�‹[ˆÜ�f“ˆðÜ�‹[ˆÜ�f“ˆô
 �1‹:”w˜q“z€qØ
�'‰'€CØ
�&‰&€CØ	
�‰€BØ
�&‰&€CØ€EØ	ƒxØ‰ä�r–ˆAØ˜!‘9‰~ ¨1¡I¡Ó.Ø�ÙØ‰y˜1‹}Ø“	˜SÑ “	Ø‰y˜1�}Ø“	˜SÑ •	ñ ö ÜÐ1Ó2Ð2ô ˜cœ
Ó6š
�1¨v¡o�Q™
€EÐ6Ø‘€IØ	
€BÛˆØ
�$‰i‰Šñ à�b�€JÙ"'Ó(¢%˜$ˆC�ŒI¡%€DÐ(ä˜cœ
Ó6š
�1¨v¡o�Q™
€EÐ6Ø‘€IØ	
€BÛˆØ
�‰h‰Šñ à�b�€JÙ!&Ó'¢˜ˆBˆtŒH¡€DÐ'à	
�‰�YÓ	×	'Ñ	'¨
Ó	3€BØ	
�‰�YÓ	×	'Ñ	'¨
Ó	3€BÜ
ˆb�"‹+€CØ�;‰;�t˜d‘{Ó#Ð#øðw&Ü”e˜T˜E 1“oÓ&ˆÜ”e˜A˜t“nÓ%‹ûô ó Ø�ˆØ‹ðûô ó Ø�ˆØ‹ðüò4 7ùò )ùâ6ùò (sQ   ‚G2 ’H% ©H; Ã=	IÄ
IÄ0IÅ	IÅIÆI Ç2-H"È%H8È7H8È;IÉIN)é   )Ú__doc__r,   © ó    r+   Ú<module>r1      s   ðñõBw$r0   