Ë
    ›2ÚiúF  ã                   óò  — d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
mZ 	 d dlZd%d„Zd„ Ze	j                   j#                  ed¬«      e	j                   j%                  ddg«      d	„ «       «       Zd
„ Zd„ Zd„ Ze	j                   j#                  edu d¬«      d„ «       ZdD � cg c]  } d| z   ‘Œ	 c} Ze j2                  dk  redD � cg c]  } d| z   ‘Œ	 c} z  Zg d¢ZdD � cg c]  } d| z   ‘Œ	 c} Ze j2                  dk  redD � cg c]  } d| z   ‘Œ	 c} z  Zd„ Zg d¢Ze j2                  dk  redgz  Ze	j                   j=                  d«      d„ «       Zg d¢Z e j2                  dk  re g d¢z  Z d„ Z!d„ Z"e	j                   jG                   ejH                  d«      d vd!¬«      d"„ «       Z%e	j                   j%                  dg d#¢«      d$„ «       Z&y# e$ r dZY �Œ­w xY wc c} w c c} w c c} w c c} w )&é    N)ÚIS_WASMc                 óð   — |€| j                   }i }t        | «      D ]W  }t        | |«      }t        |d«      sŒt        |d«      sŒ)|j                  |k7  sŒ9|j                  dz   |j                   z   ||<   ŒY |S )zEReturns a mapping of all objects with the wrong __module__ attribute.Ú
__module__Ú__name__ú.)r   ÚdirÚgetattrÚhasattrr   )ÚmoduleÚmodule_nameÚresultsÚnameÚitems        úR/var/www/html/acx/venv/lib/python3.12/site-packages/numpy/tests/test_public_api.pyÚ	check_dirr      sx   € àÐØ—o‘oˆØ€GÜ�F“ò BˆÜ�v˜tÓ$ˆÜ�D˜,Õ'¬G°D¸*Õ,EØ—O‘O {Ó2Ø ŸO™O¨cÑ1°D·M±MÑAˆG�DŠMð	Bð
 €Nó    c                  ó¨   — i dd“dd“dd“dd“dd	“d
d“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“d d!“d"d#d$œ¥} | }t        t        «      }||k(  sJ ‚y )%NÚ_add_newdoc_ufuncz.numpy.core._multiarray_umath._add_newdoc_ufuncÚadd_docstringz*numpy.core._multiarray_umath.add_docstringÚ
add_newdocz#numpy.core.function_base.add_newdocÚadd_newdoc_ufuncÚbyte_boundsznumpy.lib.utils.byte_boundsÚcompare_chararraysz/numpy.core._multiarray_umath.compare_chararraysÚ	deprecateznumpy.lib.utils.deprecateÚdeprecate_with_docz"numpy.lib.utils.deprecate_with_docÚdispznumpy.lib.function_base.dispÚfastCopyAndTransposez1numpy.core._multiarray_umath.fastCopyAndTransposeÚget_array_wrapz#numpy.lib.shape_base.get_array_wrapÚget_includeznumpy.lib.utils.get_includeÚ
recfromcsvznumpy.lib.npyio.recfromcsvÚ
recfromtxtznumpy.lib.npyio.recfromtxtÚ	safe_evalznumpy.lib.utils.safe_evalÚset_string_functionz)numpy.core.arrayprint.set_string_functionÚshow_configznumpy.__config__.showznumpy.lib.utils.show_runtimeznumpy.lib.utils.who)Úshow_runtimeÚwho)r   Únp)ÚundocumentedÚ	allowlistÚbad_resultss      r   Útest_numpy_namespacer+   !   s  € ðØÐMðàÐEðð 	Ð;ðð 	ÐLð	ð
 	Ð4ðð 	ÐOðð 	Ð0ðð 	ÐBðð 	Ð.ðð 	Ð Sðð 	Ð?ðð 	Ð4ðð 	Ð2ðð 	Ð2ðð 	Ð0ðð  	ÐJð!ð" 	Ð.ð#ð$ 7Ø$ò'€Lð, €IÜœB“-€Kð ˜)Ò#Ð#Ñ#r   zcan't start subprocess)Úreasonr   Útestingc                 óˆ   — t         j                  dd| z   f}t        j                  |«      }|rJ ‚| t	        t
        «      v sJ ‚y)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_importr5   A   sD   € ô �>‰>˜4Ð!7¸$Ñ!>Ð
?€CÜ×$Ñ$ SÓ)€FÙÐˆ:ð ”3”r“7‰?Ð‰?r   c                  ó|   — t        t        t        «      «      t        t        t        t        «      «      «      k(  sJ ‚y)zWAssert that output of dir has only one "testing/tester"
    attribute without duplicateN)Úlenr   r'   Úset© r   r   Útest_dir_testingr:   X   s'   € ô Œs”2‹w‹<œ3œs¤3¤r£7›|Ó,Ò,Ð,Ñ,r   c                  óD   — t        t        j                  «      } | i k(  sJ ‚y ©N)r   r'   Úlinalg©r*   s    r   Útest_numpy_linalgr?   ^   s   € ÜœBŸI™IÓ&€KØ˜"ÒÐÑr   c                  óD   — t        t        j                  «      } | i k(  sJ ‚y r<   )r   r'   Úfftr>   s    r   Útest_numpy_fftrB   c   s   € ÜœBŸF™FÓ#€KØ˜"ÒÐÑr   z#ctypes not available in this pythonc                  óž   — t        j                  t        j                  j                  j
                  «      } t        | dd «      }|�J d«       ‚y )NÚtest_not_exportedzG'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_EXPORTrL   h   sG   € ô �;‰;”r—w‘w×0Ñ0×9Ñ9Ó:€Dä�Ð)¨4Ó0€AØˆ9ð 5ð 4ó 5‰9r   )"Ú	array_apizarray_api.linalgÚ	ctypeslibÚdoczdoc.constantsz
doc.ufuncsÚdtypesÚ
exceptionsÚf2pyrA   Úlibz
lib.formatz
lib.mixinszlib.recfunctionszlib.scimathzlib.stride_tricksr=   Úmaz	ma.extraszma.mrecordsÚmatlibÚ
polynomialzpolynomial.chebyshevzpolynomial.hermitezpolynomial.hermite_ezpolynomial.laguerrezpolynomial.legendrezpolynomial.polynomialÚrandomr-   ztesting.overridesÚtypingztyping.mypy_pluginÚversionznumpy.)é   é   )Ú	distutilszdistutils.cpuinfozdistutils.exec_commandzdistutils.misc_utilzdistutils.logzdistutils.system_info)z
numpy.charznumpy.emathz	numpy.rec):Úcompatzcompat.py3kÚconftestrG   zcore.arrayprintzcore.defchararrayzcore.einsumfunczcore.fromnumericzcore.function_basezcore.getlimitszcore.memmapzcore.multiarrayzcore.numericzcore.numerictypeszcore.overrideszcore.recordszcore.shape_basez
core.umathz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
fft.helperzlib.arraypadzlib.arraysetopszlib.arrayteratorzlib.function_basezlib.histogramszlib.index_trickszlib.nanfunctionsz	lib.npyiozlib.polynomialzlib.shape_basezlib.twodim_basezlib.type_checkzlib.ufunclikezlib.user_arrayz	lib.utilszlinalg.lapack_litezlinalg.linalgzma.corezma.testutilszma.timer_comparisonÚ	matrixlibzmatrixlib.defmatrixzpolynomial.polyutilszrandom.mtrandzrandom.bit_generatorztesting.print_coercion_tables)7z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                 óT   — d| v sd| v sd| v ry| t         v ry| t        v ry| t        v ryy)z%Check if this needs to be considered.z._z.testsz.setupFT)ÚPUBLIC_MODULESÚPUBLIC_ALIASED_MODULESÚPRIVATE_BUT_PRESENT_MODULES©r   s    r   Úis_unexpectedre   1  s@   € àˆt�|�x 4Ñ'¨8°tÑ+;ØàŒ~ÑØàÔ%Ñ%ØàÔ*Ñ*Øàr   )znumpy.core.code_generatorsz!numpy.core.code_generators.genapiz)numpy.core.code_generators.generate_umathz+numpy.core.code_generators.ufunc_docstringsz-numpy.core.code_generators.generate_numpy_apiz-numpy.core.code_generators.generate_ufunc_apiz$numpy.core.code_generators.numpy_apiz-numpy.core.code_generators.generate_umath_docz/numpy.core.code_generators.verify_c_api_versionznumpy.core.cversionsznumpy.core.generate_numpy_apiznumpy.core.umath_testsznumpy.distutils.msvc9compilerz'ignore:.*np.compat.*:DeprecationWarningc                  óô   — g } t        j                  t        j                  t        j                  dz   d¬«      D ],  \  }}}t        |«      sŒ|t        vsŒ| j                  |«       Œ. | rt        d| › �«      ‚y)z|
    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   re   Ú	SKIP_LISTÚappendÚAssertionError)ÚmodnamesÚ_ÚmodnameÚispkgs       r   Útest_all_modules_are_expectedrt   W  s|   € ð €HÜ$×2Ñ2¼¿¹Ü:<¿+¹+ÈÑ:KØ;?ôAò %Ñˆˆ7�Eô ˜Õ! g´YÒ&>ð �O‰O˜GÕ$ð%ñ ÜÐ9¸(¸ÐDÓEÐEð r   )z
numpy.mathznumpy.doc.constants.reznumpy.doc.constants.textwrapznumpy.lib.emathz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.warningsc                  ó–   — d„ }  | d«      }t         D ]  }|j                   | |«      «       Œ |rt        dj                  |«      «      ‚y)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                 óT  — g }t        j                  | «      }t        |d«      r|j                  }nt	        |«      }|D ]g  }|j                  d«      rŒ| dz   |z   }t        t        ||«      t        j                  «      sŒBt        |«      sŒN|t        vsŒW|j                  |«       Œi |S )NÚ__all__rq   r   )Ú	importlibÚimport_moduler
   rw   r   Ú
startswithÚ
isinstancer	   ÚtypesÚ
ModuleTypere   ÚSKIP_LIST_2rn   )Úmod_nameÚmembersr   ÚobjnamesÚobjnameÚfullobjnames         r   Úfind_unexpected_membersz@test_all_modules_are_expected_2.<locals>.find_unexpected_members   s˜   € ØˆÜ×(Ñ(¨Ó2ˆÜ�6˜9Ô%Ø—~‘~‰Hä˜6“{ˆHàò 	8ˆGØ×%Ñ% cÕ*Ø&¨™n¨wÑ6�Üœg f¨gÓ6¼×8HÑ8HÕIÜ$ [Õ1Ø&¬kÒ9Ø#ŸN™N¨;Õ7ð	8ð ˆr   Únumpyz5Found unexpected object(s) that look like modules: {}N)ra   Úextendro   Úformat)r„   Úunexpected_membersrr   s      r   Útest_all_modules_are_expected_2r‰   ‡  sb   € ò2ñ$ 1°Ó9ÐÜ!ò DˆØ×!Ñ!Ñ"9¸'Ó"BÕCðDñ Üð +ß+1©6Ð2DÓ+EóGð 	Gð r   c                  ó|  — d„ } g }t         D ]  } | |«      rŒ|j                  |«       Œ |rt        dj                  |«      «      ‚t        D ]  }	 t        |«       Œ |rt        dj                  |«      «      ‚t        j                  d¬«      5 }t        j                  dt        ¬«       t        j                  dt        ¬«       t        D ]  } | |«      rŒ|j                  |«       Œ 	 ddd«       |rt        d	j                  |«      «      ‚y# t        $ r |j                  |«       Y Œáw xY w# 1 sw Y   ŒFxY w)
a	  
    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                 óZ   — 	 t        j                  | «       y# t        t        f$ r Y yw xY w)NFT)rx   ry   ÚImportErrorÚAttributeError)r   s    r   Úcheck_importablez-test_api_importable.<locals>.check_importableÃ  s3   € ð	Ü×#Ñ# KÔ0ð øô œ^Ð,ò 	Ùð	ús   ‚ ˜*©*z5Modules in the public API that cannot be imported: {}z1Modules in the public API that were not found: {}T)ÚrecordÚalways)ÚcategoryNzPModules that are not really public but looked public and can not be imported: {})ra   rn   ro   r‡   rb   Úevalr�   ÚwarningsÚcatch_warningsÚfilterwarningsÚDeprecationWarningÚImportWarningrc   )rŽ   Úmodule_namesr   Úws       r   Útest_api_importablerš   »  sG  € òð €LÜ%ò -ˆÙ Õ,Ø×Ñ Õ,ð-ñ Üð ,ß,2©F°<Ó,@óBð 	Bô .ò -ˆð	-Ü�Õð-ñ Üð )ß)/©°Ó)=ó?ð 	?ô 
×	 Ñ	 ¨Ô	-ð 1°Ü×Ñ Ô3EÕFÜ×Ñ ´=ÕAÜ6ò 	1ˆKÙ# KÕ0Ø×#Ñ# KÕ0ñ	1÷1ñ Üð "ç"(¡&¨Ó"6ó8ð 	8ð øô ò 	-Ø×Ñ Ö,ð	-ú÷1ð 1ús%   ÁDÂAD2ÃD2ÄD/Ä.D/Ä2D;ÚPy_DEBUG)Nr   Ú0z£NumPy 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                  ó  — t        j                  d«      t        j                  v } t        j
                  j                  «       }	 |j                  d¬«      }t        |«      dk(  r| rd}t        |«      d‚y	 t        d„ |D «       «      }|j                  «       }d	|j                  › d
�}|t         j"                  u sJ |«       ‚y# t        $ r |j                  dg «      }Y Œ‰w xY w# t        $ r | rd}t        |«      d‚Y yw xY w)z}
    Entry point for Array API implementation can be found with importlib and
    returns the numpy.array_api namespace.
    ÚplatlibrM   )Úgroupr   z%No entry points for 'array_api' foundNc              3   ó@   K  — | ]  }|j                   d k(  sŒ|–— Œ y­w)r…   Nrd   )Ú.0Úeps     r   ú	<genexpr>z-test_array_api_entry_point.<locals>.<genexpr>  s   è ø€ Ò<˜¨¯©°GÓ);”"Ñ<ùs   ‚—z%'numpy' not in array_api entry pointsznumpy entry point value 'z0' does not point to our Array API implementation)Ú	sysconfigÚget_pathr'   rI   rx   ÚmetadataÚentry_pointsÚselectr�   Úgetr7   ro   ÚnextÚStopIterationÚloadÚvaluer…   rM   )Únumpy_in_sitepackagesÚepsÚxp_epsÚmsgr¢   Úxps         r   Útest_array_api_entry_pointr³   ë  s  € ô  &×.Ñ.¨yÓ9¼R¿[¹[ÐHÐä
×
Ñ
×
)Ñ
)Ó
+€Cð*Ø—‘ +�Ó.ˆô ˆ6ƒ{�aÒÙ Ø9ˆCÜ  Ó%¨4Ð/ØðÜÑ<˜vÔ<Ó<ˆð 
�‰‹€Bà
# B§H¡H :ð .9ð 	9ð ð ”—‘Ñ Ð% #Ó%Ñ øô3 ò *ð
 —‘˜ bÓ)Šð*ûô ò Ù Ø9ˆCÜ  Ó%¨4Ð/Ùð	ús$   ÁC Á7C$ ÃC!Ã C!Ã$D Ã?D )ÚModuleDeprecationWarningÚVisibleDeprecationWarningÚComplexWarningÚTooHardErrorÚ	AxisErrorc                 ó
  — | t         j                  v sJ ‚| t        j                  «       vsJ ‚t        t         | «      j                  dk(  sJ ‚| t         j
                  j                  v sJ ‚t        t         j
                  | «       y )Nznumpy.exceptions)r'   rw   Ú__dir__r	   r   rQ   rd   s    r   Útest_moved_exceptionsr»     sl   € ð ”2—:‘:ÑÐÐØ”r—z‘z“|Ñ#Ð#Ð#ä”2�tÓ×'Ñ'Ð+=Ò=Ð=Ð=Ø”2—=‘=×(Ñ(Ñ(Ð(Ð(ÜŒB�M‰M˜4Õ r   r<   )'r/   r¤   r1   rj   r|   rx   r“   r…   r'   ÚpytestÚnumpy.testingr   rE   rŒ   r   r+   ÚmarkÚskipifÚparametrizer5   r:   r?   rB   rL   ra   Úversion_inforb   rc   re   rm   r•   rt   r~   r‰   rš   ÚxfailÚget_config_varr³   r»   )Úss   0r   ú<module>rÅ      s„  ðÛ 
Û Û Û Û Û Û ã Û Û Ý !ðÛó

ò$ð@ ‡�×Ñ�GÐ$<ÐÓ=Ø‡�×Ñ˜ ) Ó-ñó .ó >ðò*-òò
ð
 ‡�×Ñ�F˜d�NØ@ð ó Bñ5óBð5ð(#)ö # 1�(˜Q“,ò #€ðH ×Ñ�gÒØð
ö	Øˆ�1‹ò	ñ 	€NòÐ ð;6ö ;°˜x¨!›|ò ;Ð ðx ×Ñ�gÒØð8
ö:$Øˆ�1‹ò:$ñ :Ðòzò&€	ð ×Ñ�gÒØÐ1Ð2Ñ2€Ið ‡�×ÑÐEÓFñFó GðFò,€ð" ×Ñ�gÒØò ñ €Kò1Gòh-8ð` ‡�×ÑØ€I×Ñ˜ZÓ(°Ð>ð	8ð ó ñ&&óð&&ðR ‡�×Ñ˜ò "7ó 8ñ!ó8ñ!øð_ ò ØƒFðüò\#ùòJ	ùò(;ùòz:$s)   °G Â0G%ÃG*Ã,G/ÄG4ÇG"Ç!G"