+
    Qifm                     6   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RI
t^ RIHt  ^ RItRR ltR t]	P$                  P'                  ]RR7      ]	P$                  P)                  RR.4      R	 4       4       tR
 tR tR t]	P$                  P'                  ]RJ RR7      R 4       t. RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NRNR*NR+NR,NR-N U u. uF  p R.V ,           NK  	  up t]P6                  R8  d!   ]R U u. uF  p R.V ,           NK  	  up ,          t. ROt. R/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUN U u. uF  p R.V ,           NK  	  up t]P6                  R8  d   ]. RVNRWNRXNRYNRZNR[NR\NR]NR^NR_NR`NRaNRbNRcNRdNReNRfNRgNRhNRiNRjNRkNRlNRmNRnNRoNRpNRqNRrNRsNRtNRuNRvNRwNRxNRyNRzNR{NR|NR}NR~NRNRNRNRNRNRNRNRNRNRNRNRNRNRN U u. uF  p R.V ,           NK  	  up ,          tR t]P6                  R8  d   . tMR.tR t . ROt!]P6                  R8  d   ]!. RO,          t!R t"R t#]	P$                  PI                  ]PJ                  ! R4      R9  RR7      R 4       t&R t']	P$                  PQ                  R4      R 4       t)R t*R t+R R lt,R t-R#   ] d    Rt ELi ; iu up i u up i u up i u up i )    N)IS_WASMc                8   Vf   V P                   p/ p\        V 4       Fx  pVR8X  d   K  \        W4      p\        VR4      '       g   K+  \        VR4      '       g   K?  VP                  V8w  g   KR  VP                  R,           VP                   ,           W#&   Kz  	  V# )zEReturns a mapping of all objects with the wrong __module__ attribute.core
__module____name__.)r   dirgetattrhasattrr   )modulemodule_nameresultsnameitems   &&   a/Users/mibo/.openclaw/workspace/.venv/lib/python3.14/site-packages/numpy/tests/test_public_api.py	check_dirr      s}    ooGF6>v$D,''GD*,E,EOO{2 OOc1DMMAGM  N    c                  <    R R/p \        \        4      pW8X  g   Q hR# )recarrayznumpy.rec.recarrayN)r   np)	allowlistbad_resultss     r   test_numpy_namespacer   &   s*     	(I B-K ###r   zcan't start subprocess)reasonr   testingc                    \         P                  RRV ,           3p\        P                  ! V4      pV'       d   Q hV \	        \
        4      9   g   Q hR# )a  Make sure we can actually use the modules we lazy load.

While not exported as part of the public API, it was accessible.  With the
use of __getattr__ and __dir__, this isn't always true It can happen that
an infinite recursion may happen.

This is the only way I found that would force the failure to appear on the
badly implemented code.

We also test for the presence of the lazily imported modules in dir

z-czimport numpy; numpy.N)sys
executable
subprocesscheck_outputr	   r   )r   exeresults   &  r   test_import_lazy_importr#   1   sD     >>4!7$!>
?C$$S)F: 3r7??r   c                     \        \        \        4      4      \        \        \        \        4      4      4      8X  g   Q hR# )zSAssert that output of dir has only one "testing/tester"
attribute without duplicateN)lenr	   r   set r   r   test_dir_testingr(   H   s'     s2w<3s3r7|,,,,r   c                  J    \        \        P                  4      p V / 8X  g   Q hR # N)r   r   linalgr   s    r   test_numpy_linalgr-   N   s    BII&K"r   c                  J    \        \        P                  4      p V / 8X  g   Q hR # r*   )r   r   fftr,   s    r   test_numpy_fftr0   S   s    BFF#K"r   z#ctypes not available in this pythonc                      \         P                  ! \        P                  P                  P
                  4      p \        V R R4      pVe   Q R4       hR# )test_not_exportedNzG'test_not_exported' is mistakenly exported, NPY_NO_EXPORT does not work)ctypesCDLLr   _core_multiarray_tests__file__r
   )cdllfs     r   test_NPY_NO_EXPORTr:   X   sG     ;;rxx11::;D)40A9 5 4 59r   	ctypeslibdtypes
exceptionsf2pyr/   libzlib.array_utilsz
lib.formatzlib.introspectz
lib.mixinsz	lib.npyiozlib.recfunctionszlib.scimathzlib.stride_tricksr+   maz	ma.extraszma.mrecords
polynomialzpolynomial.chebyshevzpolynomial.hermitezpolynomial.hermite_ezpolynomial.laguerrezpolynomial.legendrezpolynomial.polynomialrandomstringsztesting.overridestypingztyping.mypy_pluginversionnumpy.conftestr   zcore.multiarrayzcore.numericz
core.umathzcore.arrayprintzcore.defchararrayzcore.einsumfunczcore.fromnumericzcore.function_basezcore.getlimitszcore.numerictypeszcore.overrideszcore.recordszcore.shape_basezf2py.auxfuncszf2py.capi_mapszf2py.cb_ruleszf2py.cfuncszf2py.common_ruleszf2py.crackfortranzf2py.diagnosezf2py.f2py2ezf2py.f90mod_ruleszf2py.func2subrz
f2py.ruleszf2py.symboliczf2py.use_ruleszlib.user_arrayzlinalg.lapack_litezma.corezma.testutilsmatlib	matrixlibzmatrixlib.defmatrixzpolynomial.polyutilszrandom.mtrandzrandom.bit_generatorztesting.print_coercion_tableszdistutils.armccompilerzdistutils.fujitsuccompilerzdistutils.ccompilerzdistutils.ccompiler_optzdistutils.commandzdistutils.command.autodistzdistutils.command.bdist_rpmzdistutils.command.buildzdistutils.command.build_clibzdistutils.command.build_extzdistutils.command.build_pyzdistutils.command.build_scriptszdistutils.command.build_srczdistutils.command.configz!distutils.command.config_compilerzdistutils.command.developzdistutils.command.egg_infozdistutils.command.installzdistutils.command.install_clibzdistutils.command.install_dataz!distutils.command.install_headerszdistutils.command.sdistzdistutils.conv_templatezdistutils.corezdistutils.extensionzdistutils.fcompilerzdistutils.fcompiler.absoftzdistutils.fcompiler.armzdistutils.fcompiler.compaqzdistutils.fcompiler.environmentzdistutils.fcompiler.g95zdistutils.fcompiler.gnuzdistutils.fcompiler.hpuxzdistutils.fcompiler.ibmzdistutils.fcompiler.intelzdistutils.fcompiler.laheyzdistutils.fcompiler.mipszdistutils.fcompiler.nagzdistutils.fcompiler.nonezdistutils.fcompiler.pathf95zdistutils.fcompiler.pgzdistutils.fcompiler.nvzdistutils.fcompiler.sunzdistutils.fcompiler.vastzdistutils.fcompiler.fujitsuzdistutils.from_templatezdistutils.intelccompilerzdistutils.lib2defzdistutils.line_endingszdistutils.mingw32ccompilerzdistutils.msvccompilerzdistutils.npy_pkg_configzdistutils.numpy_distributionzdistutils.pathccompilerzdistutils.unixccompilerc                    RV 9  ;'       dF    RV 9  ;'       d9    RV 9  ;'       d,    V \         9  ;'       d    V \        9  ;'       d
    V \        9  # )z%Check if this needs to be considered.z._z.testsz.setup)PUBLIC_MODULESPUBLIC_ALIASED_MODULESPRIVATE_BUT_PRESENT_MODULESr   s   &r   is_unexpectedrO     sm     	D 	4 	4XT1 	4 	4hd6J 	4 	4&	4 	4..	4 	4 33	r   znumpy.distutils.msvc9compilerc                 $   . p \         P                  ! \        P                  \        P                  R,           RR7       F7  w  rp\        V4      '       g   K  V\        9  g   K&  V P                  V4       K9  	  V '       d   \        RV  24      hR# )zp
Test that we don't add anything that looks like a new public module by
accident.  Check is based on filenames.
r   N)pathprefixonerrorzFound unexpected modules: )	pkgutilwalk_packagesr   __path__r   rO   	SKIP_LISTappendAssertionError)modnames_modnameispkgs       r   test_all_modules_are_expectedr^     sy     H$22:<++:K;?AE !!gY&> OOG$A 9(DEE r   c                     R p V ! R4      p\          F  pVP                  V ! V4      4       K  	  V'       d   \        RV 24      hR# )a  
Method checking all objects. The pkgutil-based method in
`test_all_modules_are_expected` does not catch imports into a namespace,
only filenames.  So this test is more thorough, and checks this like:

    import .lib.scimath as emath

To check if something in a module is (effectively) public, one can check if
there's anything in that namespace that's a public function/object but is
not exposed in a higher-level namespace.  For example for a `numpy.lib`
submodule::

    mod = np.lib.mixins
    for obj in mod.__all__:
        if obj in np.__all__:
            continue
        elif obj in np.lib.__all__:
            continue

        else:
            print(obj)

c                    . p\         P                  ! V 4      p\        VR 4      '       d   VP                  pM\	        V4      pV F  pVP                  R4      '       d   K  V R,           V,           p\        \        W$4      \        P                  4      '       g   KW  \        V4      '       g   Kj  V\        9  g   Kw  VP                  V4       K  	  V# )__all__r[   r   )	importlibimport_moduler   ra   r	   
startswith
isinstancer
   types
ModuleTyperO   SKIP_LIST_2rX   )mod_namemembersr   objnamesobjnamefullobjnames   &     r   find_unexpected_members@test_all_modules_are_expected_2.<locals>.find_unexpected_members_  s    ((269%%~~H6{HG%%c**&nw6gf68H8HII$[11&k9#NN;7   r   numpyz3Found unexpected object(s) that look like modules: N)rK   extendrY   )rn   unexpected_membersr\   s      r   test_all_modules_are_expected_2rs   F  sY    2$ 19!!!"9'"BC "  ));(<> ? 	? r   c                    R p . p\          F$  pV ! V4      '       d   K  VP                  V4       K&  	  V'       d   \        RV 24      h\         F  p \	        V4       K  	  V'       d   \        RV 24      h\        P                  ! RR7      ;_uu_ 4       p\        P                  ! R\        R7       \        P                  ! R\        R7       \         F-  pV ! V4      '       d   K  VR8X  d   K  VP                  V4       K/  	  R	R	R	4       V'       d   \        R
V 24      hR	#   \
         d    TP                  T4        K  i ; i  + '       g   i     LK; i)z
Check that all submodules listed higher up in this file can be imported

Note that if a PRIVATE_BUT_PRESENT_MODULES entry goes missing, it may
simply need to be removed from the list (deprecation may or may not be
needed - apply common sense).
c                 d     \         P                  ! V 4       R#   \        \        3 d     R # i ; i)FT)rb   rc   ImportErrorAttributeError)r   s   &r   check_importable-test_api_importable.<locals>.check_importable  s3    	##K0  ^, 		s    //z3Modules in the public API that cannot be imported: z/Modules in the public API that were not found: T)recordalways)categoryznumpy.distutils.msvccompilerNzNModules that are not really public but looked public and can not be imported: )rK   rX   rY   rL   evalrw   warningscatch_warningsfilterwarningsDeprecationWarningImportWarningrM   )rx   module_namesr   ws       r   test_api_importabler   z  sD    L%,,, &  **69 : 	: .	- .  ''3n6 7 	7 
	 	 	-	-3EF=A6K#K00 #&DD ''4 7 
.  @ ,~/ 0 	0 #  	-,	- 
.	-s+   D(AE*E3E(EEE	Py_DEBUGzNumPy possibly built with `USE_DEBUG=True ./tools/travis-test.sh`, which does not expose the `array_api` entry point. See https://github.com/numpy/numpy/pull/19800c                    \         P                  ! R4      \        P                  9   p \        P
                  P                  4       pVP                  RR7      p\        V4      ^ 8X  d   V '       d   Rp\        V4      RhR#  \        R V 4       4      pTP                  R8X  d   R# TP                  4       pR	TP                   R
2pT\        J g   Q T4       hR#   \         d    T '       d   Rp\        T4      Rh R# i ; i)zl
Entry point for Array API implementation can be found with importlib and
returns the main numpy namespace.
platlib	array_api)groupz%No entry points for 'array_api' foundNc              3   J   "   T F  qP                   R 8X  g   K  Vx  K  	  R# 5i)rp   NrN   ).0eps   & r   	<genexpr>-test_array_api_entry_point.<locals>.<genexpr>  s     <vG);""vs   #
#z%'numpy' not in array_api entry pointsznumpy.array_apiznumpy entry point value 'z0' does not point to our Array API implementation)	sysconfigget_pathr   r7   rb   metadataentry_pointsselectr%   rY   nextStopIterationvalueloadrp   )numpy_in_sitepackagesepsxp_epsmsgr   xps         r   test_array_api_entry_pointr     s      &..y9R[[H



)
)
+CZZkZ*F
6{a 9C %4/<v<< 
xx$$ 		B
#BHH: .9 	9  ;;'   9C %4/	s   C C>,C>=C>c                     R p R pV ! \         P                  4      pV! V4      pV ! \         P                  ! 4       4      pV! V4      pW#8X  g   Q RVP                  V4       24       hR# )z|
Checks if `dir(np)` and `np.__all__` are consistent and return
the same content, excluding exceptions and private members.
c                 `    V  Uu0 uF  qP                  R 4      '       d   K  VkK  	  up# u upi )r[   )rd   )
member_setms   & r   _remove_private_membersFtest_main_namespace_all_dir_coherence.<locals>._remove_private_members  s%    %?:a\\#->:???s   ++c                 &    V P                  R 04      # bool)
difference)r   s   &r   _remove_exceptionsAtest_main_namespace_all_dir_coherence.<locals>._remove_exceptions  s    $$&
  	r   zMembers that break symmetry: N)r   ra   __dir__symmetric_difference)r   r   all_membersdir_memberss       r   %test_main_namespace_all_dir_coherencer     sm    
@
 *"**5K$[1K)"**,7K$[1K% '++K8
9	;%r   z:ignore:numpy.core(\.\w+)? is deprecated:DeprecationWarningc                 P   ^ RI Hp  \        \        P                  4       EF  pVP                  R4      '       g   VR9   g   RV 2\        9   d   K2  \        \        P                  V4      p\        P                  ! V4      '       d   VP                  '       dw   VP                  P                  e_   TpTp\        V4       FI  pVP                  R4      '       d   K  \        W54      p\        RV 2V.R7      pV\        Wu4      J d   KI  Q h	  K  V\        W4      J d   EK  Q h	  R# )zd
Check that all "semi-public" members of `numpy._core` are also accessible
from `numpy.core` shims.
Nr[   rF   __znumpy.core.)fromlist)testsrC   )
numpy.corer   r	   r   r5   rd   rL   r
   inspectismodule__spec__origin
__import__)r   member_namemember	submodulesubmodule_namesubmodule_member_namesubmodule_membercore_submodules           r   test_core_shims_coherencer     s
    288} ""3''22}%)??;/ V$$FOO$:$:$FI(N),Y%(33D99#*9#L !+!.!1234"
 (7",    *8  WT7777O %r   c                 v   ^ RI Hp  ^ RIHp ^ RIHp \        0p\        4       p/ p. p\        .p\        V4      ^ 8  Ed   VP                  4       p\        V4       EF  p	\        W4      p
\        P                  ! V
4      '       dk   RV
P                  9   dZ   V	P                  R4      '       gC   RV
P                  9  d2   V	R9  d+   W9  d%   VP!                  V
4       VP#                  V
4       K  \        P$                  ! V
4      '       g$   \'        W\        P(                  34      '       g   K  W9   d   V
P                  R9   d   VP                  R8X  d   K  V
P                  R8X  d%   VP                  P                  R4      '       d   EK3  V
P                  R9   d   VP                  R	8X  d   EKX  VP                  R
8X  d   EKl  VP!                  V
P                  VP                  WZ,          34       EK  VP#                  V
4       VP                  WZ&   EK  	  EK  ???\        V4      ^ 8X  g   Q V4       hR# )z
Check that each public function is available from one location only.

Test performs BFS search traversing NumPy's public API. It flags
any function-like object that is accessible from more that one place.
)Callable)Any)_ArrayFunctionDispatcherrp   r[   numpy._coretrimcoefznumpy.polynomialnumpy.strings
numpy.charN)r>   r@   r   r   )absolutearccosarccosharcsinarcsinharctanarctan2arctanh
left_shiftright_shift	conjugateinvert	remainderdivideconcatenatepower	transposeaddequal	not_equalgreatergreater_equalless
less_equal)collections.abcr   rD   r   numpy._core._multiarray_umathr   r   r&   r%   popr	   r
   r   r   r   rd   rX   r   
isfunctionre   ufunc)r   r   dispatched_functionvisited_modulesvisited_functionsfunctions_original_pathsduplicated_functionsmodules_queuer   r   r   s              r   test_functions_single_locationr   ,  s    ) /1TO14 ?A )+DM
m
q
 ""$v;KV1F   ((6??***3//V__4#EE-$$V,##F+ ""6**6#BCC.  , & 72  :5223EFF   +  !//_<  ,6  )//19; &))&17=,4a 'd 	?,D#$)?+??)r   c            	         \         .p \         0p\        4       p. p\        V 4      ^ 8  Ed    V P                  4       p\	        V4       EF  p\        WE4      p\        P                  ! V4      '       dk   RVP                  9   dZ   VP                  R4      '       gC   RVP                  9  d2   VR9  d+   Wa9  d%   V P                  V4       VP                  V4       K  \        P                  ! V4      '       d   K  \        VR4      '       g   K  VP                  P                  R4      '       d   K  VP                  VP                  8w  g   EK  Wb9  g   EK  VP                  R9   d   VP                  R8X  d   EK6  VP                  R8X  d   VP                  R8X  g#   VP                  R8X  d   VP                  R8X  d   EK}  VP                  R9   d   VP                  R	8X  d   EK  VP                  R9   d   EK  VP                  R
VP                  RVP                  RVP                  /4       VP                  V4       EK  	  EK0  V'       d   \        V4      ^ 8X  g   Q V4       hR# R# )r   rp   r[   r   r   r   r   rz   	numpy.recznumpy.ctypeslibFuncactualexpectedN)charr   r>   r@   lapack_litemrecordsr   r   rA   rD   mtrandbit_generatorr   )c_long
c_longlong)	BitGenerator	GeneratorMT19937PCG64	PCG64DXSMPhiloxRandomStateSFC64SeedSequence)r   r&   r%   r   r	   r
   r   r   r   rd   rX   r   r   r   r   r   r   incorrect_entriesr   r   r   s          r   test___module___attributer    s   DMdO
m
q
 ""$v;KV1F   ((6??***3//V__4 $ 
 -$$V,##F+$$V,,
++OO..s33!!V__4/ ?? '  oo8 __
2v'7Q__0V__5S OO'??OO'88 ?? '  !(( &"3"3"FOO "%%f-y '| $%*=,==* r   c                $    V ^8  d   QhR\         /# )   returnr   )formats   "r   __annotate__r    s      t r   c                    V P                   pV P                  pV P                  pW!P                  R 4      R,          8X  g   Q h\        P
                  V,          p\        P                  ! \        VP                  R 4      V4      pWPJ ;'       gY    \        VR4      ;'       dE    \        V R4      ;'       d1    VP                  V P                  8H  ;'       d    VP                   V8H  # )r   __get____self__)
__qualname__r   r   splitr   modules	functoolsreducer
   r   )objqualnamer   r   r   
actual_objs   &     r   "_check_correct_qualname_and_moduler    s    H<<D..K>>#&r****[[%F!!'8>>#+>GJ 	
 	
 J	* 0 0wsJ/G 0 0!!S^^30 0##x/r   c            	         \         .p \         0p\        4       p. p\        V 4      ^ 8  Ed   V P                  4       p\	        V4       EFo  p\        WE4      p\        P                  ! V4      '       dk   RVP                  9   dZ   VP                  R4      '       gC   VR	9  d<   RVP                  9  d+   Wa9  d%   V P                  V4       VP                  V4       K  \        P                  ! V4      '       d   K  \        VR4      '       g   K  VP                  P                  R4      '       d   K  VP                  R4      '       d   EK  \        V4      '       d   EK  Wb9  g   EK!  VP                  RVP                   RV 2RVP                   RVP                   2/4       VP                  V4       EKr  	  EK  V'       d   \        V4      ^ 8X  g   Q V4       hR# R# )
r   rp   r[   r   r   found_at:
advertisesN>   r   rD   )r   r&   r%   r   r	   r
   r   r   r   rd   rX   r   r   r  r   r  r  s          r   *test___qualname___and___module___attributer    s    DMdO
m
q
 ""$v;KV1F   ((6??***3//#66V__4-$$V,##F+$$V,,
++OO..s33**3//6v>>/!(("v&7q$F$):):(;1V=P=P<Q&R "%%f-7 ': $%*=,==* r   r*   )      )	distutilszdistutils.cpuinfozdistutils.exec_commandzdistutils.misc_utilzdistutils.logzdistutils.system_info)r   znumpy.emathr   )znumpy.lib.mathznumpy.matlib.charznumpy.matlib.recznumpy.matlib.emathznumpy.matlib.exceptionsznumpy.matlib.mathznumpy.matlib.linalgznumpy.matlib.fftznumpy.matlib.randomznumpy.matlib.ctypeslibznumpy.matlib.ma)znumpy.distutils.log.sysznumpy.distutils.log.loggingznumpy.distutils.log.warnings)Nr   0).r  rb   r   rT   r   r   r   rf   r~   pytestrp   r   numpy.testingr   r3   rv   r   r   markskipifparametrizer#   r(   r-   r0   r:   rK   version_inforL   rM   rO   rW   r^   rh   rs   r   xfailget_config_varr   r   r   r   r   r  r  r  )ss   0r   <module>r+     s        
       !
$ G$<=)- . >*-

 FdN@  B5B5(!)!)!) !) 	!)
 
!) 
!) !) !) !) !) !) !) !) !) !)  	!!)" #!)$ %!)& '!)( )!)* +!), -!). /!)0 1!)2 3!)4 5!)6 7!)8 9!): ;!)< =!)> ?!)@ A!) ! !)1(Q,, !) !D g
	
1 
	 	N (6(6
(6 (6 	(6
 (6 (6 (6 (6 (6 (6 (6 (6 (6 (6 (6  !(6" #(6$ %(6& '(6( )(6* +(6, -(6. /(60 1(62 3(64 5(66 7(68 9(6: ;(6< =(6> ?(6@ A(6B C(6D E(6F G(6H I(6J K(6L M(6N $O(6 ( (6x!|| (6 ( R g8
$8
(8
 "8
 &	8

  8
 )8
 *8
 &8
 +8
 *8
 )8
 .8
 *8
 '8
 08
  (!8
" )#8
$ (%8
& -'8
( -)8
* 0+8
, &-8
. &/8
0 18
2 "38
4 "58
6 )78
8 &98
: );8
< .=8
> &?8
@ &A8
B 'C8
D &E8
F (G8
H (I8
J 'K8
L &M8
N 'O8
P *Q8
R %S8
T %U8
V &W8
X 'Y8
Z *[8
\ &]8
^ '_8
`  a8
b %c8
d )e8
f %g8
h 'i8
j +k8
l &m8
n &o8
:$8
1 8
:$ :z wI01IF, g  K1?h00f Z(>	8  ''T2 A.8.8br@jG>T&)>W  Fv!F	&(T:$s)   K7 9L$LL.L7	LL