403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/numpy/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/numpy/tests/__pycache__/test_public_api.cpython-311.pyc
�

���c
?��P�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZ	ddlZn
#e
$rdZYnwxYwdd�Zd�Ze	j�ed���e	j�ddd	g��d
�����Zd�Zd�Zd
�Ze	j�edud���d���Zd�dD��Zgd�Zd�dD��Zd�Zgd�Zd�Zgd�Zd�Zd�Z e	j�!ej"d��dud���d���Z#dS)�N)�IS_WASMc���|�|j}i}t|��D]R}t||��}t|d��r0t|d��r |j|kr|jdz|jz||<�S|S)zEReturns a mapping of all objects with the wrong __module__ attribute.N�
__module__�__name__�.)r�dir�getattr�hasattrr)�module�module_name�results�name�items     �=/usr/lib/python3/dist-packages/numpy/tests/test_public_api.py�	check_dirrs������o���G��F���B�B���v�t�$�$���D�,�'�'�	B�G�D�*�,E�,E�	B��O�{�2�2� �O�c�1�D�M�A�G�D�M���N�c��idd�dd�dd�dd�d	d�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#d$d%��}|}tt��}||ksJ�dS)&N�Testerz,numpy.testing._private.nosetester.NoseTester�_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_boundsznumpy.lib.utils.byte_bounds�compare_chararraysz/numpy.core._multiarray_umath.compare_chararrays�	deprecateznumpy.lib.utils.deprecate�deprecate_with_docz"numpy.lib.utils.deprecate_with_doc�dispznumpy.lib.function_base.disp�fastCopyAndTransposez1numpy.core._multiarray_umath.fastCopyAndTranspose�get_array_wrapz#numpy.lib.shape_base.get_array_wrap�get_includeznumpy.lib.utils.get_include�
recfromcsvznumpy.lib.npyio.recfromcsv�
recfromtxtznumpy.lib.npyio.recfromtxt�	safe_evalznumpy.lib.utils.safe_eval�set_string_functionz)numpy.core.arrayprint.set_string_functionznumpy.__config__.showznumpy.lib.utils.show_runtimeznumpy.lib.utils.who)�show_config�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�#�$/�6�$�)���L�.�I��B�-�-�K��)�#�#�#�#�#�#rzcan't start subprocess)�reasonr�testingrc��tjdd|zf}tj|��}|rJ�|t	t
��vsJ�dS)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-czimport numpy; numpy.N)�sys�
executable�
subprocess�check_outputrr()r�exe�results   r�test_import_lazy_importr6BsM���>�4�!7�$�!>�
?�C�
�
$�S�
)�
)�F������3�r�7�7�?�?�?�?�?�?rc��ttt����tttt������ksJ�dS)zWAssert that output of dir has only one "testing/tester"
    attribute without duplicateN)�lenrr(�set�rr�test_dir_testingr;Ys;���s�2�w�w�<�<�3�s�3�r�7�7�|�|�,�,�,�,�,�,�,�,rc�H�ttj��}|iksJ�dS�N)rr(�linalg�r+s r�test_numpy_linalgr@_s(���B�I�&�&�K��"������rc�H�ttj��}|iksJ�dSr=)rr(�fftr?s r�test_numpy_fftrCds(���B�F�#�#�K��"������rz#ctypes not available in this pythonc��tjtjjj��}t
|dd��}|�
Jd���dS)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_EXPORTrMisC���;�r�w�0�9�:�:�D���)�4�0�0�A��9�9�4�9�9�9�9�9rc��g|]}d|z��S�znumpy.r:��.0�ss  r�
<listcomp>rSs(��&�&�&�1�(�Q�,�&�&�&r)%�	array_apizarray_api.linalg�	ctypeslib�	distutilszdistutils.cpuinfozdistutils.exec_commandzdistutils.misc_utilz
distutils.logzdistutils.system_info�docz
doc.constantsz
doc.ufuncs�f2pyrB�libz
lib.formatz
lib.mixinszlib.recfunctionszlib.scimathzlib.stride_tricksr>�maz	ma.extraszma.mrecords�matlib�
polynomialzpolynomial.chebyshevzpolynomial.hermitezpolynomial.hermite_ezpolynomial.laguerrezpolynomial.legendrezpolynomial.polynomial�randomr.�typingztyping.mypy_plugin�version)z
numpy.charznumpy.emathz	numpy.recc��g|]}d|z��SrOr:rPs  rrSrS�s.��u�u�u��x�!�|�u�u�ur)t�compatzcompat.py3k�conftestrHzcore.arrayprintzcore.defchararrayzcore.einsumfunczcore.fromnumericzcore.function_basezcore.getlimitszcore.memmapzcore.multiarrayzcore.numericzcore.numerictypeszcore.overrideszcore.recordszcore.shape_basez
core.umathzcore.umath_testszdistutils.armccompilerzdistutils.ccompilerzdistutils.ccompiler_optzdistutils.commandzdistutils.command.autodistzdistutils.command.bdist_rpmzdistutils.command.buildzdistutils.command.build_clibzdistutils.command.build_extzdistutils.command.build_pyzdistutils.command.build_scriptszdistutils.command.build_srczdistutils.command.configz!distutils.command.config_compilerzdistutils.command.developzdistutils.command.egg_infozdistutils.command.installzdistutils.command.install_clibzdistutils.command.install_dataz!distutils.command.install_headerszdistutils.command.sdistzdistutils.conv_templatezdistutils.corezdistutils.extensionzdistutils.fcompilerzdistutils.fcompiler.absoftzdistutils.fcompiler.armzdistutils.fcompiler.compaqzdistutils.fcompiler.environmentzdistutils.fcompiler.g95zdistutils.fcompiler.gnuzdistutils.fcompiler.hpuxzdistutils.fcompiler.ibmzdistutils.fcompiler.intelzdistutils.fcompiler.laheyzdistutils.fcompiler.mipszdistutils.fcompiler.nagzdistutils.fcompiler.nonezdistutils.fcompiler.pathf95zdistutils.fcompiler.pgzdistutils.fcompiler.nvzdistutils.fcompiler.sunzdistutils.fcompiler.vastzdistutils.fcompiler.fujitsuzdistutils.from_templatezdistutils.intelccompilerzdistutils.lib2defzdistutils.line_endingszdistutils.mingw32ccompilerzdistutils.msvccompilerzdistutils.npy_pkg_configzdistutils.numpy_distributionzdistutils.pathccompilerzdistutils.unixccompiler�dualz
f2py.auxfuncszf2py.capi_mapsz
f2py.cb_ruleszf2py.cfuncszf2py.common_ruleszf2py.crackfortranz
f2py.diagnosezf2py.f2py2ezf2py.f90mod_ruleszf2py.func2subrz
f2py.rulesz
f2py.symboliczf2py.use_rulesz
fft.helperzlib.arraypadzlib.arraysetopszlib.arrayteratorzlib.function_basezlib.histogramszlib.index_trickszlib.nanfunctionsz	lib.npyiozlib.polynomialzlib.shape_basezlib.twodim_basezlib.type_checkz
lib.ufunclikezlib.user_arrayz	lib.utilszlinalg.lapack_litez
linalg.linalgzma.benchzma.corezma.testutilszma.timer_comparison�	matrixlibzmatrixlib.defmatrixzpolynomial.polyutilsz
random.mtrandzrandom.bit_generatorztesting.print_coercion_tablesz
testing.utilsc�d�d|vsd|vsd|vrdS|tvrdS|tvrdS|tvrdSdS)z%Check if this needs to be considered.z._z.testsz.setupFT)�PUBLIC_MODULES�PUBLIC_ALIASED_MODULES�PRIVATE_BUT_PRESENT_MODULES�rs r�
is_unexpectedrj's[���t�|�|�x�4�'�'�8�t�+;�+;��u��~����u��%�%�%��u��*�*�*��u��4r)znumpy.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_docznumpy.core.cversionsznumpy.core.generate_numpy_apiznumpy.distutils.msvc9compilerc��g}tjtjtjdzd���D]3\}}}t|��r|tvr|�|���4|rtd|�����dS)z|
    Test that we don't add anything that looks like a new public module by
    accident.  Check is based on filenames.
    rN)�path�prefix�onerrorzFound unexpected modules: )	�pkgutil�
walk_packagesr(�__path__rrj�	SKIP_LIST�append�AssertionError)�modnames�_�modname�ispkgs    r�test_all_modules_are_expectedryIs����H�$�2���:<�+��:K�;?�A�A�A�%�%���7�E���!�!�	%�g�Y�&>�&>�
�O�O�G�$�$�$���F��D�(�D�D�E�E�E�F�Fr)z
numpy.mathznumpy.distutils.log.sysznumpy.distutils.log.loggingznumpy.distutils.log.warningsznumpy.doc.constants.reznumpy.doc.constants.textwrapznumpy.lib.emathznumpy.lib.mathznumpy.matlib.charznumpy.matlib.recznumpy.matlib.emathznumpy.matlib.mathznumpy.matlib.linalgznumpy.matlib.fftznumpy.matlib.randomznumpy.matlib.ctypeslibznumpy.matlib.mac��d�}|d��}tD] }|�||�����!|r"td�|�����dS)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�n�g}tj|��}t|d��r|j}nt	|��}|D]t}|�d��s]|dz|z}t
t||��tj	��r-t|��r|tvr|�|���u|S)N�__all__rvr)
�	importlib�
import_moduler
r|r�
startswith�
isinstancer	�types�
ModuleTyperj�SKIP_LIST_2rs)�mod_name�membersr�objnames�objname�fullobjnames      r�find_unexpected_membersz@test_all_modules_are_expected_2.<locals>.find_unexpected_members�s������(��2�2���6�9�%�%�	#��~�H�H��6�{�{�H��	8�	8�G��%�%�c�*�*�
8�&��n�w�6���g�f�g�6�6��8H�I�I�8�$�[�1�1�8�&�k�9�9�#�N�N�;�7�7�7���r�numpyz5Found unexpected object(s) that look like modules: {}N)rf�extendrt�format)r��unexpected_membersrws   r�test_all_modules_are_expected_2r�ts���2���$1�0��9�9��!�D�D���!�!�"9�"9�'�"B�"B�C�C�C�C��G��+�+1�6�2D�+E�+E�G�G�	G�G�Grc���d�}g}tD]"}||��s|�|���#|r"td�|�����tD]7}	t|���#t$r|�|��Y�4wxYw|r"td�|�����tjd���5}tj	dt���tj	dt���tD]"}||��s|�|���#	ddd��n#1swxYwY|r"td	�|�����dS)
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�b�	tj|��n#ttf$rYdSwxYwdS)NFT)r}r~�ImportError�AttributeError)rs r�check_importablez-test_api_importable.<locals>.check_importable�sI��	��#�K�0�0�0�0���^�,�	�	�	��5�5�	�����ts��,�,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: {})
rfrsrtr�rg�evalr��warnings�catch_warnings�filterwarnings�DeprecationWarning�
ImportWarningrh)r��module_namesr�ws    r�test_api_importabler��s������L�%�-�-�����,�,�	-�����,�,�,���B��,�,2�F�<�,@�,@�B�B�	B�.�-�-��	-���������	-�	-�	-�����,�,�,�,�,�	-�����?��)�)/���)=�)=�?�?�	?�
�	 ��	-�	-�	-�1�����3E�F�F�F�F����=�A�A�A�A�6�	1�	1�K�#�#�K�0�0�
1��#�#�K�0�0�0��	1�1�1�1�1�1�1�1�1�1�1�1����1�1�1�1��8��"�"(�&��"6�"6�8�8�	8�8�8s%�A.�.B�B�A!D:�:D>�D>�Py_DEBUGz�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���tj���}	|�d���}n&#t$r|�dg��}YnwxYwt
|��dks
Jd���	td�|D����}n#t$rtd��d�wxYw|�
��}d|j�d	�}|tj
us
J|���dS)
z}
    Entry point for Array API implementation can be found with importlib and
    returns the numpy.array_api namespace.
    rT)�grouprz%No entry points for 'array_api' foundc3�0K�|]}|jdk�
|V��dS)r�Nri)rQ�eps  r�	<genexpr>z-test_array_api_entry_point.<locals>.<genexpr>�s.����<�<����G�);�);�"�);�);�);�);�<�<rz%'numpy' not in array_api entry pointsNznumpy entry point value 'z0' does not point to our Array API implementation)r}�metadata�entry_points�selectr��getr8�next�
StopIterationrt�load�valuer�rT)�eps�xp_epsr��xp�msgs     r�test_array_api_entry_pointr��s%���
�
)�
)�
+�
+�C�*����+��.�.�����*�*�*�
����b�)�)����*�����v�;�;��?�?�?�C�?�?�?�P�
�<�<�v�<�<�<�
<�
<�����P�P�P��D�E�E�4�O�P����
�����B�	9�B�H�	9�	9�	9����� � � �#� � � � � s�7� A�A�;B�B0r=)$r0�	sysconfigr2ror�r}r�r�r(�pytest�
numpy.testingrrFr�rr,�mark�skipif�parametrizer6r;r@rCrMrfrgrhrjrrryr�r�r��xfail�get_config_varr�r:rr�<module>r�s���
�
�
�
���������������������������������
�
�
�
�!�!�!�!�!�!���M�M�M�M������
�F�F�F�����
�
�
�
�$�$�$�B����G�$<��=�=������)�X�!6�7�7���8�7�>�=��*-�-�-����
���
����F�d�N�@��B�B�5�5�B�B�5�(&�&�&)�&�&�&��R����u�u�u6�u�u�u��p���&
�
�
�	�F�F�F�,����*1G�1G�1G�h-8�-8�-8�`�����I��Z�(�(��4�	8����&�&���&�&�&s�5�?�?

Youez - 2016 - github.com/yon3zu
LinuXploit