+
    ‹°³jH  ã                   ó–   € ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt  ! R R	]4      t]R
 4       t ! R R]4      tR# )é    )ÚIterable)Úsingledispatch)ÚExpr)ÚMul)ÚS)Úsympify)Úglobal_parametersc                   óP   a € ] tR t^t o RtRtR tR tR t]	R 4       t
R tRtV tR	# )
ÚTensorProductz$
Generic class for tensor products.
Fc                óš  € ^ RI HpHpHp ^ RIHp ^ RIHp ^ RIH	p V U	u. uF  p	\        V	4      NK  	  pp	VP                  R\        P                  4      p
V
'       g   \        P                  ! V .VO5!  pV# . p. p\         P"                  pV Fa  p	\%        V	\&        Ws34      '       d   VP)                  V! V	4      4       K4  \%        W–34      '       d   VP)                  V	4       KY  Wé,          pKc  	  Wä! V!  ,          p\+        V4      ^ 8X  d   V# V^8w  d   V.V,           pMTp\        P                  ! V .VO5/ VB pV! V4      # u up	i )r   )Ú	NDimArrayÚtensorproductÚArray)Ú
MatrixExpr)Ú
MatrixBase)ÚflattenÚevaluate)Úsympy.tensor.arrayr   r   r   Ú"sympy.matrices.expressions.matexprr   Úsympy.matrices.matrixbaser   Úsympy.strategiesr   r   Úgetr	   r   r   Ú__new__r   ÚOneÚ
isinstancer   ÚappendÚlen)ÚclsÚargsÚkwargsr   r   r   r   r   r   Úargr   ÚobjÚarraysÚotherÚscalarÚcoeffÚnewargss   &*,              ÚW/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/tensor/functions.pyr   ÚTensorProduct.__new__   s  € ßFÑFÝAÝ8Ý,á(,Ó-© ”˜–©ˆÐ-Ø—:‘:˜jÔ*;×*DÑ*DÓEˆçÜ—,’,˜sÐ* TÓ*ˆCØˆJàˆØˆÜ—‘ˆÛˆCÜ˜#¤¨*Ð@×AÒAØ—‘™e C›jÖ)Ü˜C ×/Ò/Ø—‘˜SÖ!à•’ñ ð �} fÑ-Õ-ˆÜˆu‹:˜Œ?ØˆLØ�AŒ:Ø�g •o‰GàˆGÜ�lŠl˜3Ð3 Ò3¨FÑ3ˆÙ�s‹|Ðùò5 .s   ¡Ec                ó,   € \        V P                  4      # ©N)r   Úshape)Úselfs   &r(   ÚrankÚTensorProduct.rank3   s   € Ü�4—:‘:‹Ðó    c                ó¬   € ^ RI Hp V P                   Uu. uF3  p\        VR4      '       d   VP                  MV! V4      P                  NK5  	  up# u upi )r   )r   r,   )r   r   r   Úhasattrr,   )r-   r   Úis   &  r(   Ú_get_args_shapesÚTensorProduct._get_args_shapes6   s>   € Ý,ØLPÏIÊIÓVÉIÀqœ7 1 g×.Ò.�—’±E¸!³H·N±NÒBÉIÑVÐVùÒVs   •9Ac                ó:   € V P                  4       p\        VR4      # )N© )r4   Úsum)r-   Ú
shape_lists   & r(   r,   ÚTensorProduct.shape:   s   € à×*Ñ*Ó,ˆ
Ü�:˜rÓ"Ð"r0   c                óž   a€ \        S4      o\        P                  ! V3R  l\        V P                  V P                  4       4       4       4      # )c              3   óª   <"  € T FH  w  rTP                  \        ;QJ d    . V3R  lV 4       F  NK  	  5M! V3R  lV 4       4      4      x € KJ  	  R# 5i)c              3   ó:   <"  € T F  p\        S4      x € K  	  R # 5ir+   )Únext)Ú.0r3   Úindexs   & €r(   Ú	<genexpr>Ú6TensorProduct.__getitem__.<locals>.<genexpr>.<genexpr>B   s   øé € Ð!;±s°!¤$ u§+ +³sùs   ƒN)Ú__getitem__Útuple)r?   r!   Úshpr@   s   &  €r(   rA   Ú,TensorProduct.__getitem__.<locals>.<genexpr>A   s?   øé € ð 
áC‘�ð �O‰OŸEœEÔ!;±sÓ!;ŸE™EÔ!;±sÓ!;Ó;×<Ð<ÛCùs   ƒAA)Úiterr   ÚfromiterÚzipr   r4   )r-   r@   s   &fr(   rC   ÚTensorProduct.__getitem__?   s>   ø€ Ü�U“ˆÜ�|Š|ô 
ä §	¡	¨4×+@Ñ+@Ó+BÔCó
ó 
ð 	
r0   r7   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	is_numberr   r.   r4   Úpropertyr,   rC   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r(   r   r      s@   ø‡ € ñð €Iò òDòWð ñ#ó ð#÷
ð 
r0   r   c                ób   € \        V R4      '       d   V P                  # \        RV ,          4      h)a0  
Return the shape of the *expr* as a tuple. *expr* should represent
suitable object such as matrix or array.

Parameters
==========

expr : SymPy object having ``MatrixKind`` or ``ArrayKind``.

Raises
======

NoShapeError : Raised when object with wrong kind is passed.

Examples
========

This function returns the shape of any object representing matrix or array.

>>> from sympy import shape, Array, ImmutableDenseMatrix, Integral
>>> from sympy.abc import x
>>> A = Array([1, 2])
>>> shape(A)
(2,)
>>> shape(Integral(A, x))
(2,)
>>> M = ImmutableDenseMatrix([1, 2])
>>> shape(M)
(2, 1)
>>> shape(Integral(M, x))
(2, 1)

You can support new type by dispatching.

>>> from sympy import Expr
>>> class NewExpr(Expr):
...     pass
>>> @shape.register(NewExpr)
... def _(expr):
...     return shape(expr.args[0])
>>> shape(NewExpr(M))
(2, 1)

If unsuitable expression is passed, ``NoShapeError()`` will be raised.

>>> shape(Integral(x, x))
Traceback (most recent call last):
  ...
sympy.tensor.functions.NoShapeError: shape() called on non-array object: Integral(x, x)

Notes
=====

Array-like classes (such as ``Matrix`` or ``NDimArray``) has ``shape``
property which returns its shape, but it cannot be used for non-array
classes containing array. This function returns the shape of any
registered object representing array.

r,   zA%s does not have shape, or its type is not registered to shape().)r2   r,   ÚNoShapeError)Úexprs   &r(   r,   r,   G   s3   € ôz ˆt�W×ÒØ�z‰zÐÜ
ØKÈdÕRóTð Tr0   c                   ó   € ] tR t^ŠtRtRtR# )rV   aB  
Raised when ``shape()`` is called on non-array object.

This error can be imported from ``sympy.tensor.functions``.

Examples
========

>>> from sympy import shape
>>> from sympy.abc import x
>>> shape(x)
Traceback (most recent call last):
  ...
sympy.tensor.functions.NoShapeError: shape() called on non-array object: x
r7   N)rK   rL   rM   rN   rO   rR   r7   r0   r(   rV   rV   Š   s   † ñó 	r0   rV   N)Úcollections.abcr   Ú	functoolsr   Úsympy.core.exprr   Úsympy.core.mulr   Úsympy.core.singletonr   Úsympy.core.sympifyr   Úsympy.core.parametersr	   r   r,   Ú	ExceptionrV   r7   r0   r(   Ú<module>ra      sJ   ðÝ $Ý $å  Ý Ý "Ý &Ý 3ô9
�Dô 9
ðx ñ?Tó ð?TôD	�9ö 	r0   