+
    h                     ^    ^ RI HtHt ^ RIHt ^ RIHtHtHtH	t	 ^ RI
Ht ^ RIHt R tR tR# )	    )ArrayComprehensionArrayComprehensionMap)ImmutableDenseNDimArray)ijkl)raises)Matrixc            	      p	  aa \        \        \        ,          \        ^^3\        ^^34      p \        \        \        ^\        ^,           34      o\        \        \        ,           \        ,           \        ,           \        ^^3\        ^^3\        ^^3\        ^^34      o\        \        \        ^^34      p\        \        \        \        ^,           \        ^,           34      pV P                  4       P                  4       . RO. RO. RO.8X  g   Q hV P                  R8X  g   Q hV P                  R8X  g   Q hV P                  4       . RO. RO. RO.8X  g   Q hV P                  4       \        . RO. RO. RO.4      8X  g   Q h\        V 4      ^	8X  g   Q h\        SP                  4       \         4      '       g   Q h\        V P                  4       \        4      '       g   Q hSP                  \        ^4      \        \        \        ^^34      8X  g   Q hSP                  \        08X  g   Q hSP                  \        ^,           38X  g   Q hSP!                  4       ^8X  g   Q hSP                  R8X  g   Q hSP                  \#        4       8X  g   Q hSP$                  \        \        ,           \        ,           \        ,           8X  g   Q hSP&                  \        ^^3\        ^^3\        ^^3\        ^^338X  g   Q hSP                  4       P                  4       . RO. RO. RO. RO.. RO. RO. RO. RO.. RO. RO. RO. RO... RO. RO. RO. RO.. RO. RO. RO. RO.. RO. RO. RO. RO...8X  g   Q hSP                  \#        4       8X  g   Q hSP(                  \        \        \        \        .8X  g   Q hSP*                  \        \        \        \        .8X  g   Q hVP                  4       P                  4       \        \        \        \        \        .8X  g   Q h\        V4      ^8X  g   Q h\-        \.        R 4       \-        \0        R 4       \-        \0        R 4       \-        \0        R 4       \-        \.        R 4       \-        \0        V3R l4       \-        \0        V3R	 l4       \-        \0        V3R
 l4       R# )   TFc                  Z    \        \        \        ,          \        ^^3\        ^. RO34      # )r   )r         r   r   r        S/usr/lib/python3/dist-packages/sympy/tensor/array/tests/test_array_comprehension.py<lambda>*test_array_comprehension.<locals>.<lambda>,   s    01q!Qi!Q	ARSr   c                  V    \        \        \        ,          \        ^^3\        ^^34      # r   r   r   r   r   r   r   -   s    1!A#1ay1a)Lr   c                  l    \        \        \        ,          \        ^^3\        ^\        ^,           34      # r   r   r   r   r   r   r   .   s"    1!A#1ay1a1+Nr   c            
      ~    \        \        \        \        ,          \        ^^3\        ^\        ^,           34      4      # r   )lenr   r   r   r   r   r   r   r   /   s'    s#5acAq!9q!QqSk#RSr   c                  l    \        \        \        ,          \        ^ \        R,           3\        ^ ^34      # )r   g      ?r   r   r   r   r   r   0   s"    01q!QWo1ayQr   c                  $   < S P                  4       # N)tolistbs   r   r   r   1   s    qxxzr   c                  $   < S P                  4       # r   tomatrixr    s   r   r   r   2       qzz|r   c                  $   < S P                  4       # r   r#   )cs   r   r   r   3   r%   r   N)r   r      )r(         )r)   	      )r   r   )r(      r)      r*   )r-   r)   r.   r*   r+   )r)   r.   r*   r+   
   )r.   r*   r+   r/      )r*   r+   r/   r0   r,   )r+   r/   r0   r,      )r/   r0   r,   r1      )r   r   r   r   r	   doitr   shapeis_shape_numericr$   r   r   
isinstancer   subsfree_symbolsranksetfunctionlimits	variablesbound_symbolsr
   	TypeError
ValueError)ader!   r'   s      @@r   test_array_comprehensionrD      s   1Q3Aq	Aq!95A1q!QqSk*A1Q3q57Q1I1ay1a)aAYOA1q!Qi(A1q!A#qsm,A668??Iz BBBB77f%%%88:)Y
;;;;::<6$$%#' ( ( ( ( q6Q;;affh 23333affh 7888866!Q<-a!Q;;;;>>aS   77q1uh668q==&&&>>SU"""::QQ&&&88Aq	Aq!9q!Qi!QCCCC668???OEUWh"i#24DFWYk"l#35FHZ\o"p"r $34DFWYk"l#35FHZ\o"p#46HJ]_s"t"v!w w w w >>SU""";;1aA,&&&??q!Ql***668??Aq!Q///q6Q;;
9ST
:LM
:NO
:ST
9QR
:)*
:+,
:+,r   c            	      .  a \        R  \        ^^34      oSP                  4       P                  4       . R
O8X  g   Q hSP                  R8X  g   Q hSP
                  '       g   Q hSP                  4       . R
O8X  g   Q h\        S4      ^8X  g   Q h\        SP                  4       \        4      '       g   Q h\        R \        ^\        34      p V P                  4       V 8X  g   Q hV P                  \        ^4      \        R \        ^^34      8X  g   Q hV P                  \        ^4      P                  4       \        . RO4      8X  g   Q h\        R \        ^^3\        ^^3\        ^^3\        ^^34      pVP                  4       P                  4       . R
O. RO. RO. RO.. RO. RO. RO. RO.. RO. RO. RO. RO... RO. RO. RO. RO.. RO. RO. RO. RO.. RO. RO. RO. RO...8X  g   Q h\        R \        ^^34      P                  4       P                  4       . RO8X  g   Q h\        R \        ^^34      P                  4       P                  4       . R
O8X  g   Q h\        \        R 4       \        R \        ^^34      o\        \        V3R l4       R	# )c                     V ^,           # r   r   r   s   &r   r   ,test_arraycomprehensionmap.<locals>.<lambda>6       !r   c                     V ^,           # r   r   rG   s   &r   r   rH   =       1Q3r   c                     V ^,           # r   r   rG   s   &r   r   rH   ?   s    acr   c                     V ^,           # r   r   rG   s   &r   r   rH   A   rI   r   c                      ^# )r   r   r   r   r   r   rH   J   s    r   c                     V ^,           # r   r   rG   s   &r   r   rH   K   rK   r   c                  V    \        \        \        ,          \        ^^3\        ^^34      # r   )r   r   r   r   r   r   r   rH   L   s    4QqS1a)aAYOr   c                     W,           # r   r   )r   r   s   &&r   r   rH   M   s    13r   c                  $   < S P                  4       # r   )r3   )rA   s   r   r   rH   N   s    qvvxr   N)r   r   r(   r-   r)   )r-   )r   r   r(   r-   )r   r-   r.   r+   r0   )r(   r.   r/   r1      )r-   r+   r1         )r.   r1            )r+   rT   rW   !   )   )r/   rV      %   .   )r1   rW   r\   1   =   )rT   rY   r^   A   Q   )rV   r\   7   I   [   )rW   r^   rc   a   y   )r   r   r   r   r   )r   r   r3   r   r4   r5   r   r6   r   r   r7   r
   r@   )exprr!   rA   s     @r   test_arraycomprehensionmaprh   5   sC   maAY7A668??///77d??88:(((q6Q;;affh 78888 Aq	:D99;$99Q?3MAq!9MMMM99Q?!%<\%JJJJmaAYAq	Aq!9qRSUViXA668???4DFXZl"m#35GI\^q"r#57JL`bv"w"y $45GI\^q"r#57JL`bv"w#68LNbdy"z"|!} } } } !Q1I6;;=DDF/YYY Aq	:??AHHJo]]]
:OP.Aq	:A
:'(r   N)&sympy.tensor.array.array_comprehensionr   r   sympy.tensor.arrayr   	sympy.abcr   r   r   r	   sympy.testing.pytestr
   sympy.matricesr   rD   rh   r   r   r   <module>rn      s"    \ 6     ' !+-Z)r   