+
   /f	%\p                   ^   ^ RI t ^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RIH	t
 ^RIHt ]P                  P                  tRs]! R(R]P$                  ! R4      /]
B t	R tR tR	 tR
 t ! R R4      t]! 4       t. R)OtRR./t]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.,           ]R&   ]R,          R.,           ]R&   ]R,          R.,           ]R&   ]R,          R.,           ]R&   ]R,          R.,           ]R&   ]R,          RR.,           ]R&   ]R,          . R*O,           ]R&   ]R,          R.,           ]R&   R.]R&   R.]R&   R.]R&   ]P6                  ! 4       P$                  P8                  ^8w  g+   ]P:                  ! 4       P$                  P<                  ^8:  d   ]P                  R+9  dz   ]P>                  ! 4       ]P@                  ! 4       3R,8w  dS   ]PC                  . R-O4       ]R,          . R.O,           ]R&   ]R,          . R/O,           ]R&   ]R,          RR.,           ]R&    ! R  R!4      t" ! R" R#4      t# ! R$ R%4      t$ ! R& R'4      t%R# )0    N)Path)c_names_dict)util	CHARACTERcc                  p    \        \        4      P                  4       P                  R ,          p V R,          # )srcarray_from_pyobj)r   __file__resolveparent)testroots    K/usr/lib/python3.14/site-packages/numpy/f2py/tests/test_array_from_pyobj.pyget_testdirr      s+    H~%%'..6H(((    c                 n    \         f-   \        4       R,          .p \        P                  ! V RR7      s R# R# )z.
Build the required testing extension module

Nzwrapmodule.ctest_array_from_pyobj_ext)module_name)wrapr   r   build_meson)r	   s    r   setup_moduler      s4     |MN*
 1LM	 r   c                 P    \         P                  V 4      ^,          p\        V4      # )   )r   array_attrsflags2names)arrflagss   & r   
flags_infor   *   s"    S!!$Eur   c                     . pR F=  p\        V 4      \        \        V^ 4      ,          '       g   K,  VP                  V4       K?  	  V# )
CONTIGUOUS)r    FORTRANOWNDATA
ENSURECOPYENSUREARRAYALIGNED
NOTSWAPPED	WRITEABLEWRITEBACKIFCOPYUPDATEIFCOPYBEHAVED
BEHAVED_ROCARRAYFARRAY)absgetattrr   append)r   infoflagnames   &  r   r   r   /   s@    D  u:h222KK!#$ Kr   c                   J   a  ] tR t^Ft o . 3R ltR tR tR tR tR t	Rt
V tR# )	Intentc                    VR ,          V n         ^ pV FO  pVR8X  d   V\        P                  ,          pK#  V\        \        RVP	                  4       ,           4      ,          pKQ  	  W n        R# ):NNNoptionalF2PY_INTENT_N)intent_listr   F2PY_OPTIONALr/   upperr   )selfr8   r   is   &&  r   __init__Intent.__init__G   sW    &q>AJ+++~	'ABB	 
 
r   c                z    VP                  4       pVR 8X  d   RpV P                  V P                  V.,           4      # )in_in)lower	__class__r8   )r;   names   &&r   __getattr__Intent.__getattr__Q   s5    zz|5=D~~d..$788r   c                @    R RP                  V P                  4       R2# )zintent(,))joinr8   r;   s   &r   __str__Intent.__str__W   s!    $"2"234A66r   c                $    R V P                   : R2# )zIntent(rI   r8   rK   s   &r   __repr__Intent.__repr__Z   s    )),A..r   c                x   a  \         ;QJ d    V 3R  lV 4       F  '       d   K   R# 	  R# ! V 3R  lV 4       4      # )c              3   @   <"   T F  qSP                   9   x  K  	  R # 5iNrO   ).0rD   r;   s   & r   	<genexpr>#Intent.is_intent.<locals>.<genexpr>^   s     >4+++s   FT)allr;   namess   f*r   	is_intentIntent.is_intent]   s,    s>>ss>s>s>>>>r   c                t    \        V P                  4      \        V4      8H  ;'       d    V P                  ! V!  # rT   )lenr8   r[   rY   s   &*r   is_intent_exactIntent.is_intent_exact`   s-    4##$E
2MMt~~u7MMr   )r   r8   N)__name__
__module____qualname____firstlineno__r=   rE   rL   rP   r[   r_   __static_attributes____classdictcell____classdict__s   @r   r4   r4   F   s-     #% 97/?N Nr   r4   BOOLBYTEUBYTESHORTUSHORTINTUINTLONGULONGLONGLONG	ULONGLONGFLOATDOUBLECFLOATSTRING1STRING5
LONGDOUBLECDOUBLECLONGDOUBLEc                   T   a  ] tR t^t o / tR tR tR tR tR t	R t
R tR tR	tV tR
# )Typec                   \        V\        P                  4      '       dX   TpR p\        P	                  4        F;  w  r4\        V\
        4      '       d   K  VP
                  VP
                  J g   K9  Tp M	  V P                  P                  VP                  4       R 4      pVe   V# \        P                  V 4      pVP                  V4       WPP                  VP                  4       &   V# rT   )
isinstancenpdtyper   itemstype_type_cachegetr:   object__new___init)clsrD   dtype0nr<   objs   &&    r   r   Type.__new__   s    dBHH%%FD$**,!!T**v{{aff/DD - oo!!$**,5?JnnS!		$(+

%
r   c                   VP                  4       V n        V P                  R 8X  dQ   \        V P                  ,          p\        P                  V n        ^V n        \        P                  ! R4      V n        EMV P                  P                  R4      '       d   \        V P                  R,          ,          p\        P                  V n        \        V P                  R,          ;'       g    ^ 4      V n        \        P                  ! RV P                   24      V n        Ms\        V P                  ,          p\        \        RV P                  ,           4      V n        VP                  V n        \        P                  ! VP                  4      V n        V P
                  VP                  8X  g   Q hVP                  V n        VP                  V n        R# )r   r   STRING:Nr   N:r   NNSNPY_N)r:   NAMEr   r   
NPY_STRINGtype_numelsizer   r   
startswithintr/   itemsizer   numchar	dtypechar)r;   rD   r1   s   && r   r   
Type._init   s#   JJL	99#		*D OODMDK#DJYY!!(++		".D OODMdiim00q1DKAdkk]"34DJ		*D#D&499*<=DM--DK$)),DJ}}(((II	r   c                    R V P                    RV P                   RV P                   RV P                   RV P                   RV P
                   2# )zType(z)|type_num=z, dtype=z, type=z	, elsize=z, dtypechar=)r   r   r   r   r   r   rK   s   &r   rP   Type.__repr__   sV    		{+dmm_ =** &9T[[M :"nn-/ 	0r   c                v    \         V P                  ,           Uu. uF  qP                  V4      NK  	  up# u upi rT   )
_cast_dictr   rC   r;   _ms   & r   
cast_typesType.cast_types   s,    -7		-BC-Brr"-BCCCs   6c                T    \          Uu. uF  qP                  V4      NK  	  up# u upi rT   )_type_namesrC   r   s   & r   	all_typesType.all_types   s!    -89[rr"[999s   %c                    \         V P                  ,          P                  p. p\         F;  p\         V,          P                  V8  g   K!  VP	                  \        V4      4       K=  	  V# rT   r   r   	alignmentr   r0   r}   r;   bitstypesrD   s   &   r   smaller_typesType.smaller_types   O    DII&00DD!++d2T$Z(   r   c                    \         V P                  ,          P                  p. p\         FM  pW0P                  8X  d   K  \         V,          P                  V8X  g   K3  VP	                  \        V4      4       KO  	  V# rT   r   r   s   &   r   equal_typesType.equal_types   s\    DII&00Dyy D!++t3T$Z(	  
 r   c                    \         V P                  ,          P                  p. p\         F;  p\         V,          P                  V8  g   K!  VP	                  \        V4      4       K=  	  V# rT   r   r   s   &   r   larger_typesType.larger_types   r   r   )r   r   r   r   r   r   N)ra   rb   rc   rd   r   r   r   rP   r   r   r   r   r   re   rf   rg   s   @r   r}   r}      s8     K #.0D: r   r}   c                   >   a  ] tR t^t o R tR tR tR tR tRt	V t
R# )Arrayc           
         R V P                    RV P                   RV P                   RV P                   RV P                   2
# )zArray(z, z)|arr=)r   dimsintentr   r   rK   s   &r   rP   Array.__repr__   sD    2dii[4;;- @HH:VDHH:/ 	0r   c           
     &   Wn         W n        W0n        \        P                  ! V4      V n        W@n        \        P                  VP                  VP                  W#P                  V4      V n        \        V P                  \        P                  4      '       g   Q h\        P!                  V P                  4      V n        \%        V4      ^8  Edi   V P                  P'                  R4      '       d   VP                  \        P(                  ,          '       g   Q hV P                  P                  R,          '       d   Q hV P                  P                  R,          '       g   Q hV P"                  ^,          \        P*                  ,          '       d   Q hMVP                  \        P(                  ,          '       d   Q hV P                  P                  R,          '       g   Q hV P                  P                  R,          '       d   Q hV P"                  ^,          \        P*                  ,          '       g   Q hVf   RV n        RV n        R# VP'                  R4      '       dr   \        V\        P                  4      '       g   Q \1        \        V4      4      4       h\        P2                  ! V4      P4                  ! V!  P                  4       V n        M\        P2                  ! \        P2                  ! WAP6                  R7      P4                  ! V!  V P                  P'                  R4      ;'       d    R;'       g    RR	7      V n        V P,                  P8                  V8X  g   Q hV P,                  P;                  V P                  P                  R
,          R7       V P,                  P                  R,          '       g	   Q WC34       h\        P!                  V P,                  4      V n        \%        V4      ^8  Ed   V P                  P'                  R4      '       d|   V P,                  P                  R,          '       d   Q hV P,                  P                  R,          '       g   Q hV P.                  ^,          \        P*                  ,          '       d   Q hMzV P,                  P                  R,          '       g   Q hV P,                  P                  R,          '       d   Q hV P.                  ^,          \        P*                  ,          '       g   Q hV P"                  ^,          V P.                  ^,          8X  g   Q hV P"                  ^,          V P.                  ^,          8X  g   Q hV P"                  ^,          ^8:  d   V P"                  ^,          V P.                  ^,          8X  gg   Q \1        V P"                  ^,          V P.                  ^,          V P                  P=                  4       V P,                  P=                  4       34      4       hV P"                  ^,          RR V P.                  ^,          RR 8X  g5   Q \1        V P"                  ^,          V P.                  ^,          34      4       hV P"                  ^,          pVP'                  R4      '       dj   VP8                  V8X  d   VP                  R,          '       g@   \?        R4      R.8X  g   Q hVR,          '       g   Q \?        R4       R24       hVR,          pMVR,          '       d   Q hWPP.                  ^,          8X  g   Q \1        V P"                  ^,          V P.                  ^,          \?        ^ V P"                  ^,          ,          V P.                  ^,          ,
          4      \?        V P"                  ^,          4      V34      4       hVP'                  R4      '       d7   V P"                  ^,          ^,          V P                   P                  8  g   Q hMcV P"                  ^,          ^,          V P                   P                  8X  g   Q hV PA                  V P,                  V P                  4      '       g   Q h\        V P                  \        P                  4      '       d~   VP                  \C        VP8                  4      P                  8X  dN   VP'                  R4      '       g5   V P"                  ^,          ^8:  d   V PE                  4       '       g   Q hR# R# R# R# R# )   r   r!   r    Ncacher   CF)orderr'   writer"   inplaceF_CONTIGUOUSi    r(   z	 not set.copy)#r   r   r   r   deepcopyobj_copyr   r   callr   r   r   r   r   r   ndarrayr   arr_attrr^   r[   F2PY_INTENT_Cr!   pyarr
pyarr_attrreprarrayreshaper   r   setflagstobytesr   	arr_equalr}   has_shared_memory)r;   typr   r   r   	arr_flagss   &&&&& r   r=   Array.__init__  s   		c* 99S\\ ZZ!<<6 $((BJJ////((2t9q={{$$S))t'9'999:988>>)4444xx~~l3333 MM!,t||;;<;;"LL4+=+===>=xx~~i000088>>,7777a(4<<7787;DJ"DOG$$c2::..?T#Y?.#..5::<DJMM2::DA{{,,S199cAAcDJ ::##s***

$((.."=>zz	**9SM9***4::6t9q={{$$S))::++I6666zz''5555 OOA.==>==zz''	2222::++L9999*T\\99:9}}Q4??1#5555}}Q4??1#5555==q ==#tq'99 4a "  "

""$	A < 9 }}Q$(:23(?? 	MM!dooa0G B 	? MM!$	I&&		S SYY~%>%>t$):(;;;;$$F+d*;)<I'FF$I!D(())OOA.. 	MM!OOADMM!,,tq/AABa()6
 1 	. G$$==#A&$))*:*::::==#A&$))*:*::::NN4::txx8898dhh

++zzT#))_333''//DMM!4D4I113333 5J/ 4 ,r   c                `    VP                   VP                   8w  d   R # W8H  P                  4       # )F)shaperX   )r;   arr1arr2s   &&&r   r   Array.arr_equalc  s&    ::#!!##r   c                ,    \        V P                  4      # rT   )strr   rK   s   &r   rL   Array.__str__h  s    488}r   c                
   V P                   V P                  J d   R# \        V P                   \        P                  4      '       g   R# \
        P                  V P                   4      pV^ ,          V P                  ^ ,          8H  # )z6Check that created array shares data with input array.TF)r   r   r   r   r   r   r   r   )r;   obj_attrs   & r   r   Array.has_shared_memoryk  sY    88txx$((BJJ//##DHH-{dmmA...r   )	r   r   r   r   r   r   r   r   r   N)ra   rb   rc   rd   rP   r=   r   rL   r   re   rf   rg   s   @r   r   r      s%     0_4B$
/ /r   r   c                   &   a  ] tR tRt o R tRtV tR# )
TestIntentiu  c                4   \        \        P                  P                  4      R 8X  g   Q h\        P                  P                  P                  R4      '       g   Q h\        P                  P                  P                  R4      '       d   Q h\        P                  P                  P                  RR4      '       g   Q h\        P                  P                  P                  RR4      '       g   Q h\        P                  P                  R4      '       d   Q hR# )zintent(in,out)r   rA   N)r   r   r@   outr   r[   r_   rK   s   &r   test_in_outTestIntent.test_in_outv  s    6::>>"&6666zz||%%c****::<<//4444zz||++C6666zz||++D#6666::'',,,,,r    N)ra   rb   rc   rd   r   re   rf   rg   s   @r   r   r   u  s     - -r   r   c                     a  ] tR tRt o ]P
                  ! RR]R7      ]R 4       4       t]	R 4       t
]	R 4       tR tR	 t]P                  P                  R
RR.4      ]P                  P                  RRR.4      ]P                  P                  RRR.4      R 4       4       4       tR tR tR tR tR tR tR tR tR tR tR tR tR  tR! tR" tR# t R$ t!R% t"R& t#R' t$R(t%V t&R)# )*TestSharedMemoryi  Tclass)autousescopeparamsc                z   a \        SP                  4      SP                  n        V3R  lSP                  n        R# )c                 D   < \        \        SP                  4      WV4      # rT   )r   r}   param)r;   r   r   r   requests   &&&&r   <lambda>-TestSharedMemory.setup_type.<locals>.<lambda>  s    Es=4r   N)r}   r   r   r   r   )r;   r   s   &fr   
setup_typeTestSharedMemory.setup_type  s(      .4r   c                    V P                   P                  P                  R 4      '       d)   V P                   P                  pRV,          RV,          .# ^^.# )r   12r   r   r   r   r;   r   s   & r   num2seqTestSharedMemory.num2seq  sF    99>>$$X..YY%%F&L#,//1vr   c                    V P                   P                  P                  R 4      '       dK   V P                   P                  pRV,          RV,          RV,          .RV,          RV,          RV,          ..# . RO. RO.# )	r   r   r   3456)r         )      r   r   r  s   & r   num23seqTestSharedMemory.num23seq  sm    99>>$$X..YY%%F6\3<v>6\3<v>@ @9%%r   c                    V P                  ^.\        P                  V P                  4      pVP	                  4       '       d   Q hR# )r	  N)r   r   r@   r  r   r;   as   & r   test_in_from_2seq"TestSharedMemory.test_in_from_2seq  s6    JJsFJJ5&&(((((r   c                   V P                   P                  4        F  p\        P                  ! V P                  VP
                  R 7      pV P                  \        V P                  4      .\        P                  V4      pVP                  V P                   P                  8X  dI   VP                  4       '       g1   Q \        V P                   P
                  VP
                  34      4       hK  VP                  4       '       g   K  Q h	  R# r   N)r   r   r   r   r  r   r^   r   r@   r   r   r   r;   tr   r  s   &   r   test_in_from_2casttype'TestSharedMemory.test_in_from_2casttype  s    %%'A((4<<qww7C

C-.

C@Axx499+++**,,NdDIIOOQWW3M.NN,..0000 (r   r   wror   r   r   inp2seq23seqc                   \        V RV,           4      p\        P                  ! W@P                  P                  VR7      pVP                  VR8H  R7       T P                  VP                  VR8H  ;'       d#    \        P                  P                  ;'       g    \        P                  V4      pVP                  4       '       g   Q hR# )z5Test if intent(in) array can be passed without copiesr   r   r   r  r   r   N)r/   r   r   r   r   r   r   r   r@   r   r   )r;   r   r   r  seqr   r  s   &&&&   r   test_in_nocopyTestSharedMemory.test_in_nocopy  s    
 dECK(hhs))//?ESL*JJsyy#66&**,,EE6::M""$$$$r   c                    \         P                  ! V P                  V P                  P                  R 7      pV P                  \        V P                  4      .\        P                  V4      pVP                  4       '       g   Q h V P                  ^.\        P                  P                  V P                  4      p\        R4      h  \         d-   p\        T4      P                  R4      '       g   h  Rp?R# Rp?ii ; i)r   z,intent(inout) should have failed on sequencez6failed to initialize intent(inout|inplace|cache) arrayN)r   r   r  r   r   r^   r   inoutr   r@   SystemError	TypeErrorr   r   )r;   r   r  msgs   &   r   test_inout_2seq TestSharedMemory.test_inout_2seq  s    hht||499??;JJDLL)*FLL#>""$$$$	N

A3

 0 0$,,?A LMM  	s8&&LN NN	s   6C C=!C88C=c                
   \         P                  ! V P                  V P                  P                  R R7      p\        V P                  4      \        V P                  ^ ,          4      3pV P                  V\        P                  P                  V4      pVP                  4       '       g   Q h\         P                  ! V P                  V P                  P                  RR7      p\        V P                  4      \        V P                  ^ ,          4      3p V P                  V\        P                  P                  V4      p\        R4      h  \         d-   p\        T4      P                  R4      '       g   h  Rp?R# Rp?ii ; i)r   r   r   z2intent(inout) should have failed on improper arrayz(failed to initialize intent(inout) arrayN)r   r   r  r   r   r^   r   r@   r%  r   r&  
ValueErrorr   r   )r;   r   r   r  r(  s   &    r   test_f_inout_23seq#TestSharedMemory.test_f_inout_23seq  s   hht}}DIIOO3GT]]#Sq)9%:;JJufjj..4""$$$$hht}}DIIOO3GT]]#Sq)9%:;	F

5&**"2"2C8A DF F  	s8&&>@ @@	s   +E F!E==Fc                n   \         P                  ! V P                  V P                  P                  R 7      p\        V P                  4      \        V P                  ^ ,          4      3pV P                  V\        P                  P                  P                  V4      pVP                  4       '       g   Q hR# r  )r   r   r  r   r   r^   r   r@   r   r%  r   r;   r   r   r  s   &   r   test_c_inout_23seq#TestSharedMemory.test_c_inout_23seq  st    hht}}DIIOO<T]]#Sq)9%:;JJufjjll00#6""$$$$r   c                N   V P                   P                  4        F  p\        P                  ! V P                  VP
                  R 7      pV P                  \        V P                  4      .\        P                  P                  V4      pVP                  4       '       g   K  Q h	  R# r  )r   r   r   r   r  r   r^   r   r@   r   r   r  s   &   r   test_in_copy_from_2casttype,TestSharedMemory.test_in_copy_from_2casttype  sl    %%'A((4<<qww7C

C-.

EA**,,,, (r   c                    V P                  \        V P                  4      \        V P                  ^ ,          4      .\        P                  V P                  4      pVP                  4       '       d   Q hR# r   N)r   r^   r  r   r@   r   r  s   & r   test_c_in_from_23seq%TestSharedMemory.test_c_in_from_23seq  sV    JJT]]1%5!67MM &&(((((r   c                p   V P                   P                  4        F  p\        P                  ! V P                  VP
                  R 7      pV P                  \        V P                  4      \        V P                  ^ ,          4      .\        P                  V4      pVP                  4       '       g   K  Q h	  R# r  )
r   r   r   r   r  r   r^   r   r@   r   r  s   &   r   test_in_from_23casttype(TestSharedMemory.test_in_from_23casttype  s|    %%'A((4==8C

T]]#Sq)9%:;VZZNA**,,,,	 (r   c                   V P                   P                  4        F  p\        P                  ! V P                  VP
                  R R7      pV P                  \        V P                  4      \        V P                  ^ ,          4      .\        P                  V4      pVP                  V P                   P                  8X  d   VP                  4       '       g   Q hK  VP                  4       '       g   K  Q h	  R# r   r   N)r   r   r   r   r  r   r^   r   r@   r   r   r  s   &   r   test_f_in_from_23casttype*TestSharedMemory.test_f_in_from_23casttype  s    %%'A((4==sCC

T]]#Sq)9%:;VZZNAxx499+++**,,,,..0000 (r   c                   V P                   P                  4        F  p\        P                  ! V P                  VP
                  R 7      pV P                  \        V P                  4      \        V P                  ^ ,          4      .\        P                  P                  V4      pVP                  V P                   P                  8X  d   VP                  4       '       g   Q hK  VP                  4       '       g   K  Q h	  R# r  )r   r   r   r   r  r   r^   r   r@   r   r   r   r  s   &   r   test_c_in_from_23casttype*TestSharedMemory.test_c_in_from_23casttype  s    %%'A((4==8C

T]]#Sq)9%:;VZZ\\3PAxx499+++**,,,,..0000 (r   c                   V P                   P                  4        F  p\        P                  ! V P                  VP
                  R R7      pV P                  \        V P                  4      \        V P                  ^ ,          4      .\        P                  P                  V4      pVP                  4       '       g   K  Q h	  R# r>  )r   r   r   r   r  r   r^   r   r@   r   r   r  s   &   r   test_f_copy_in_from_23casttype/TestSharedMemory.test_f_copy_in_from_23casttype  s    %%'A((4==sCC

T]]#Sq)9%:;VZZ__A **,,,, (r   c                   V P                   P                  4        F  p\        P                  ! V P                  VP
                  R 7      pV P                  \        V P                  4      \        V P                  ^ ,          4      .\        P                  P                  P                  V4      pVP                  4       '       g   K  Q h	  R# r  )r   r   r   r   r  r   r^   r   r@   r   r   r   r  s   &   r   test_c_copy_in_from_23casttype/TestSharedMemory.test_c_copy_in_from_23casttype  s    %%'A((4==8C

T]]#Sq)9%:;VZZ\\=N=NA **,,,, (r   c           	        V P                   P                  4        EF  pVP                  V P                   P                  8w  d   K+  \        P                  ! V P
                  VP                  R 7      p\        V P
                  4      3pV P	                  V\        P                  P                  P                  V4      pVP                  4       '       g   Q hV P	                  V\        P                  P                  V4      pVP                  4       '       g   Q h\        P                  ! V P
                  VP                  RR7      pV P	                  V\        P                  P                  P                  V4      pVP                  4       '       g   Q hV P	                  V\        P                  P                  V4      pVP                  4       '       g   Q \        VP                  4      4       h V P	                  V\        P                  P                  VRRR1,          4      p\        R4      h	  R#   \         d.   p\!        T4      P#                  R4      '       g   h  Rp?EKJ  Rp?ii ; i)r   r   r   Nz8intent(cache) should have failed on multisegmented array(failed to initialize intent(cache) array)r   r   r   r   r   r  r   r^   r   r@   r   r   r   r   r&  r,  r   r   )r;   r  r   r   r  r(  s   &     r   test_in_cache_from_2casttype-TestSharedMemory.test_in_cache_from_2casttype  s   $$&Axx499+++((4<<qww7C&)E

5&**,,"4"4c:A&&((((

5&**"2"2C8A&&((((((4<<qwwcBC

5&**,,"4"4c:A&&((((

5&**"2"2C8A&&((7$qww-7(PJJufjj&6&6DbD	B "NP P3 '(  3x**BD DDs   .5H22I*=!I%%I*c                &   V P                   P                  4        EF6  pVP                  R 8X  d   K  VP                  V P                   P                  8  d   K>  \        P
                  ! VP                  \        P                  4      pV'       dL   \        V P                  ^ ,          4      \        P                  ! VP                  4      P                  8  d   K  \        P                  ! V P                  VP                  R7      p\        V P                  4      3p V P                  V\        P                  P                   V4       \#        R4      h	  R#   \$         d.   p\'        T4      P)                  R4      '       g   h  Rp?EKp  Rp?ii ; i)r   r   z1intent(cache) should have failed on smaller arrayrK  N)r   r   r   r   r   
issubdtyper   integerr   r  iinfomaxr   r^   r   r@   r   r&  r,  r   r   )r;   r  is_intr   r   r(  s   &     r   $test_in_cache_from_2casttype_failure5TestSharedMemory.test_in_cache_from_2casttype_failure*  s   $$&Avv!xx499+++]]177BJJ7F#dll1o.!''1B1F1FF((4<<qww7C&)EI

5&**"2"2C8 "GI I' '  3x**BD DDs   +EF#!FFc                   RpV P                  V\        P                  P                  R4      pVP                  P
                  V8X  g   Q hRpV P                  V\        P                  P                  R4      pVP                  P
                  V8X  g   Q hRp V P                  V\        P                  P                  R4      p\        R4      h  \         d-   p\        T4      P                  R4      '       g   h  Rp?R# Rp?ii ; i)r	  Nz8intent(cache) should have failed on undefined dimensions2failed to create intent(cache|hide)|optional arrayr	  r	  r
  rL  r
  )
r   r   r   hider   r   r&  r,  r   r   r;   r   r  r(  s   &   r   test_cache_hidden"TestSharedMemory.test_cache_hiddenA  s    JJufll//6uu{{e###JJufll//6uu{{e###	L

5&,,"3"3T:A JL L  	s8&&HJ JJ	s   +C D!D  Dc                V   RpV P                  V\        P                  R4      pVP                  P                  V8X  g   Q hVP                  VP                  \        P                  ! WP                  P                  R7      4      '       g   Q hRpV P                  V\        P                  R4      pVP                  P                  V8X  g   Q hVP                  VP                  \        P                  ! WP                  P                  R7      4      '       g   Q hVP                  P                  R,          '       d$   VP                  P                  R,          '       d   Q hRpV P                  V\        P                  P                  R4      pVP                  P                  V8X  g   Q hVP                  VP                  \        P                  ! WP                  P                  R7      4      '       g   Q hVP                  P                  R,          '       g$   VP                  P                  R,          '       g   Q hR	p V P                  V\        P                  R4      p\        R4      h  \         d-   p\        T4      P                  R4      '       g   h  Rp?R# Rp?ii ; i)
r	  Nr   r!   r    z7intent(hide) should have failed on undefined dimensionsrX  rY  rZ  r[  )r   r   r\  r   r   r   r   zerosr   r   r   r   r&  r,  r   r   r]  s   &   r   test_hiddenTestSharedMemory.test_hiddenU  s   JJufkk40uu{{e###{{155"((5		"HIIIIJJufkk40uu{{e###{{155"((5		"HIIIIuu{{9%%aeekk,.G.GGGJJufhhmmT2uu{{e###{{155"((5		"HIIII55;;y))aeekk,.G.GGG	K

5&++t4A IK K  	s8&&HJ JJ	s   !I1 1J(<!J##J(c                   RpV P                  V\        P                  R4      pVP                  P                  V8X  g   Q hVP                  VP                  \        P                  ! WP                  P                  R7      4      '       g   Q hRpV P                  V\        P                  R4      pVP                  P                  V8X  g   Q hVP                  VP                  \        P                  ! WP                  P                  R7      4      '       g   Q hVP                  P                  R,          '       d$   VP                  P                  R,          '       d   Q hRpV P                  V\        P                  P                  R4      pVP                  P                  V8X  g   Q hVP                  VP                  \        P                  ! WP                  P                  R7      4      '       g   Q hVP                  P                  R,          '       g$   VP                  P                  R,          '       g   Q hR# )r	  Nr   r!   r    rY  rZ  )r   r   r6   r   r   r   r   ra  r   r   r   r   )r;   r   r  s   &  r   test_optional_none#TestSharedMemory.test_optional_noner  sx   JJufoot4uu{{e###{{155"((5		"HIIIIJJufoot4uu{{e###{{155"((5		"HIIIIuu{{9%%aeekk,.G.GGGJJufhh//6uu{{e###{{155"((5		"HIIII55;;y))aeekk,.G.GGG.Gr   c                    V P                   p\        V4      3pV P                  V\        P                  V4      pVP
                  P                  V8X  g   Q hVP                  4       '       d   Q hR # rT   )r  r^   r   r   r6   r   r   r   r0  s   &   r   test_optional_from_2seq(TestSharedMemory.test_optional_from_2seq  sZ    llSJJufoos3uu{{e###&&(((((r   c                   V P                   p\        V4      \        V^ ,          4      3pV P                  V\        P                  V4      pVP
                  P                  V8X  g   Q hVP                  4       '       d   Q hV P                  V\        P                  P                  V4      pVP
                  P                  V8X  g   Q hVP                  4       '       d   Q hR# r7  )	r  r^   r   r   r6   r   r   r   r   r0  s   &   r   test_optional_from_23seq)TestSharedMemory.test_optional_from_23seq  s    mmS3s1v;'JJufoos3uu{{e###&&((((JJufoo//5uu{{e###&&(((((r   c                   \         P                  ! V P                  V P                  P                  R 7      pVP
                  R,          '       g   VP
                  R,          '       g   Q hVP                  pV P                  V\        P                  V4      pV^,          ^,          VP                  ^,          ^,          8X  g   Q \        WP                  34      4       hV P                  P                  \        8w  d   ^6MRpWCP                  ^,          ^&   VP                  ^,          ^,          \         P                  ! W@P                  P                  R 7      8X  g   Q hV^,          ^,          \         P                  ! W@P                  P                  R 7      8w  g   Q hVP                  P
                  R,          '       g   Q hVP                  P                  VJ g   Q hVP                  P
                  R,          '       d$   VP                  P
                  R,          '       d   Q h\        P                  VP                  4      pV^8X  g   Q R4       hV^,          ^,          \         P                  ! W@P                  P                  R 7      8X  g   Q hVP
                  R,          '       g   VP
                  R,          '       g   Q hR# )r   r!   r    Fr(   "no write-back resolution was done!N)r   r   r  r   r   r   r   r   r   r   r   boolbaser   resolve_write_back_if_copy)r;   r   r   r  change_itemcodes   &     r   test_inplaceTestSharedMemory.test_inplace  s   hht}}DIIOO<99Y''CIIl,C,CCC		JJufnnc21vayAEE!HQK';sEEl);;' IIOOt3b!auuQx{bhh{))//JJJJ1vayBHH[		HHHHuu{{,----uuzzS   uu{{9%%aeekk,.G.GGG..quu5qy>>>y1vayBHH[		HHHH99Y''CIIl,C,CCC,Cr   c                V   \         P                  ! V P                  V P                  P                  R R7      pVP
                  R,          '       d   VP
                  R,          '       d   Q hV P                  VP                  \        P                  V4      pVP                  VJ g   Q hR# )r   r   r!   r    N)
r   r   r  r   r   r   r   r   r   r   )r;   r   r  s   &  r   test_inplace_f_order%TestSharedMemory.test_inplace_f_order  sm    hht}}DIIOO3Gyy##CIIl,C,CCCJJsyy&..#6uu||r   c                   V P                   P                  4        EF  pWP                   J d   K  \        P                  ! V P                  VP
                  R 7      pVP
                  P                   VP                   8X  g   Q hVP
                  P                   V P                   P                   Jg   Q hVP                  R,          '       g   VP                  R,          '       g   Q hVP                  pVP
                  P                  V P                   P
                  P                  8H  p V P                  V\        P                  V4      pT'       g/   \        P                  TP                  4       T'       g   Q R4       hT^,          ^,          TP                  ^,          ^,          8X  g   Q \!        Y%P                  34      4       hT P                   P
                  \"        8w  d   ^6MRpYuP                  ^,          ^&   TP                  ^,          ^,          \        P                  ! YpP                   P
                  R 7      8X  g   Q hT^,          ^,          \        P                  ! YpP                   P
                  R 7      8w  g   Q hTP                  P                  R,          '       g   Q hTP                  P$                  TJ g   Q h\        P                  TP                  4      pT^8X  g   Q R	4       hT^,          ^,          \        P                  ! YpP                   P
                  R 7      8X  g   Q hTP                  R,          '       g   TP                  R,          '       g   Q hTP
                  P                   T P                   P                   Jd   EK  Q h	  R#   \         d.   pT'       d   Q R4       hR\        T4      9   g   Q h Rp? R# Rp?ii ; i)
r   r!   r    z(Array not created while having same kindznot compatibleNz*Array created despite not having same kindFr(   rn  )r   r   r   r   r  r   r   r   kindr   r   r,  r   r   rq  r   r   ro  rp  )	r;   r  r   r   	same_kindr  excrr  rs  s	   &        r   test_inplace_from_casttype+TestSharedMemory.test_inplace_from_casttype  s   %%'AII~((4==8C99>>QVV+++99>>777yy++		,0G0GGGIIE		$))//*>*>>IJJufnnc: //6 N"NNyq6!9a+?T3,-??+ $		4 7"UK%EE!HQK558A;"((;iioo"NNNNq6!9IIOO LLLL55;;0111155::$$$221559D19BBB9q6!9IIOO LLLLyy++		,0G0GGG99>>777K (  $P&PP}'3s8333s   +!N%%O0!OOr   N)'ra   rb   rc   rd   pytestfixturer   classmethodr   propertyr  r  r  r  markparametrizer"  r)  r-  r1  r4  r8  r;  r?  rB  rE  rH  rM  rU  r^  rb  re  rh  rk  rt  rw  r}  re   rf   rg   s   @r   r   r     s4    ^^DD4  E4
   & &)1 [[WsDk2[[WsCj1[[UVW$56% 7 2 3%NF$%-)-11--P:I.L(K:H$)	)D0'8 '8r   r   r   )ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   r   )ro   rt   ru   )win32aix)Darwinarm)ry   rz   r{   )rq   rt   ru   ry   )rv   rz   r{   )&r   platformsyspathlibr   r  numpyr   numpy._core._type_aliasesr   _c_names_dict r   r  slow
pytestmarkr   dictr   r   r   r   r   r4   r   r   r   intpr   clongdoubler   system	processorextendr}   r   r   r   r   r   r   <module>r     s     
    C [[
  hhsm)N
.N N< 
( vh
'6(2
6  (G94
7 X
6 i
7  (GW+==
7 !'*fh-??
8 w'8U*;;
5 )Wf,==
6 &&1
6  (G94
7 #F+zl:
: $W-=
;  )Xw,??
7 !%(+FF
8 !'*hZ7
8 "
9 "
9 &-
;  WWY__"bnn&6&<&<&F&F!&KLL 00__ 2 2 459JJ?@)&1 5  J| !+< 8 < !J}
 'x0Hi3HHJyN Nbv/ v/r- -]8 ]8r   