403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Python312/Lib/site-packages/numpy/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Python312/Lib/site-packages/numpy/tests/__pycache__/test_public_api.cpython-312.pyc
�

	�g:o���ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z
ddl	Z	ddlmZddl
Z
	ddlZd*d�Zd�Ze
j$j'ed��e
j$j)ddg�d	���Zd
�Zd�Zd�Ze
j$j'edud
��d��ZdD�cgc]}d|z��	c}Zej6dkredD�cgc]}d|z��	c}z
Zgd�ZdD�cgc]}d|z��	c}Zej6dkredD�cgc]}d|z��	c}z
Zd�Zej6dkrdgZngZe
j$jAd�d��Z!gd�Z"ej6dkre"gd�z
Z"d�Z#d�Z$e
j$jKejLd�dvd ��d!��Z'd"�Z(e
j$jAd#�d$��Z)d%�Z*d&�Z+d'e,fd(�Z-d)�Z.y#e$rdZY���wxYwcc}wcc}wcc}wcc}w)+�N)�IS_WASMc��|�|j}i}t|�D]]}|dk(r�	t||�}t|d�s�"t|d�s�/|j|k7s�?|jdz|jz||<�_|S)zEReturns a mapping of all objects with the wrong __module__ attribute.�core�
__module__�__name__�.)r�dir�getattr�hasattrr)�module�module_name�results�name�items     �=C:\Python312\Lib\site-packages\numpy/tests/test_public_api.py�	check_dirrs������o�o���G��F��B���6�>���v�t�$���D�,�'�G�D�*�,E��O�O�{�2� �O�O�c�1�D�M�M�A�G�D�M�
B��N�c�8�ddi}tt�}||k(sJ�y)N�recarrayznumpy.rec.recarray)r�np)�	allowlist�bad_resultss  r�test_numpy_namespacer&s,��	�(��I��B�-�K��)�#�#�#rzcan't start subprocess)�reasonr�testingc��tjdd|zf}tj|�}|rJ�|t	t
�vsJ�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-czimport numpy; numpy.N)�sys�
executable�
subprocess�check_outputr	r)r�exe�results   r�test_import_lazy_importr#1sD���>�>�4�!7�$�!>�
?�C�
�
$�
$�S�
)�F���:��3�r�7�?��?rc�|�ttt��tttt���k(sJ�y)zWAssert that output of dir has only one "testing/tester"
    attribute without duplicateN)�lenr	r�set�rr�test_dir_testingr(Hs'���s�2�w�<�3�s�3�r�7�|�,�,�,�,rc�D�ttj�}|ik(sJ�y�N)rr�linalg�rs r�test_numpy_linalgr-Ns���B�I�I�&�K��"���rc�D�ttj�}|ik(sJ�yr*)rr�fftr,s r�test_numpy_fftr0Ss���B�F�F�#�K��"���rz#ctypes not available in this pythonc��tjtjjj
�}t
|dd�}|�Jd��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_EXPORTr:XsG���;�;�r�x�x�1�1�:�:�;�D���)�4�0�A��9�5�4�5�9r) �	ctypeslib�dtypes�
exceptions�f2pyr/�libzlib.array_utilsz
lib.formatzlib.introspectz
lib.mixinsz	lib.npyiozlib.recfunctionszlib.scimathzlib.stride_tricksr+�maz	ma.extraszma.mrecords�
polynomialzpolynomial.chebyshevzpolynomial.hermitezpolynomial.hermite_ezpolynomial.laguerrezpolynomial.legendrezpolynomial.polynomial�random�stringsrztesting.overrides�typingztyping.mypy_plugin�version�numpy.)��)�	distutilszdistutils.cpuinfozdistutils.exec_commandzdistutils.misc_utilz
distutils.logzdistutils.system_info)�
numpy.charznumpy.emath�	numpy.rec),�compatzcompat.py3k�conftestrzcore.multiarrayzcore.numericz
core.umathzcore.arrayprintzcore.defchararrayzcore.einsumfunczcore.fromnumericzcore.function_basezcore.getlimitszcore.numerictypeszcore.overrideszcore.recordszcore.shape_basez
f2py.auxfuncszf2py.capi_mapsz
f2py.cb_ruleszf2py.cfuncszf2py.common_ruleszf2py.crackfortranz
f2py.diagnosezf2py.f2py2ezf2py.f90mod_ruleszf2py.func2subrz
f2py.rulesz
f2py.symboliczf2py.use_rulesz
fft.helperzlib.user_arrayzlinalg.lapack_litez
linalg.linalgzma.corezma.testutilszma.timer_comparison�matlib�	matrixlibzmatrixlib.defmatrixzpolynomial.polyutilsz
random.mtrandzrandom.bit_generatorztesting.print_coercion_tables)7zdistutils.armccompilerzdistutils.fujitsuccompilerzdistutils.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.unixccompilerc�T�d|vsd|vsd|vry|tvry|tvry|tvryy)z%Check if this needs to be considered.z._z.testsz.setupFT)�PUBLIC_MODULES�PUBLIC_ALIASED_MODULES�PRIVATE_BUT_PRESENT_MODULES�rs r�
is_unexpectedrUs@���t�|�x�4�'�8�t�+;���~����%�%���*�*��rznumpy.distutils.msvc9compilerz'ignore:.*np.compat.*:DeprecationWarningc���g}tjtjtjdzd��D],\}}}t|�s�|tvs�|j|��.|rtd|����y)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__rrU�	SKIP_LIST�append�AssertionError)�modnames�_�modname�ispkgs    r�test_all_modules_are_expectedrd)s|���H�$�2�2����:<�+�+��:K�;?�A�%���7�E���!�g�Y�&>�
�O�O�G�$�%���9�(��D�E�E�r)znumpy.lib.mathznumpy.matlib.charznumpy.matlib.recznumpy.matlib.emathznumpy.matlib.exceptionsznumpy.matlib.mathznumpy.matlib.linalgznumpy.matlib.fftznumpy.matlib.randomznumpy.matlib.ctypeslibznumpy.matlib.ma)znumpy.distutils.log.sysznumpy.distutils.log.loggingznumpy.distutils.log.warningsc��d�}|d�}tD]}|j||���|rtdj|���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}tj|�}t|d�r
|j}nt	|�}|D]g}|jd�r�|dz|z}t
t||�tj�s�Bt|�s�N|tvs�W|j|��i|S)N�__all__rar)
�	importlib�
import_modulerrgr	�
startswith�
isinstancer
�types�
ModuleTyperU�SKIP_LIST_2r^)�mod_name�membersr�objnames�objname�fullobjnames      r�find_unexpected_membersz@test_all_modules_are_expected_2.<locals>.find_unexpected_membersns������(�(��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)rQ�extendr_�format)rt�unexpected_membersrbs   r�test_all_modules_are_expected_2ryUsb��2�$1��9��!�D���!�!�"9�'�"B�C�D���+�+1�6�2D�+E�G�	G�rc�|�d�}g}tD]}||�r�|j|��|rtdj|���tD]}	t|��|rtdj|���tjd��5}tjdt��tjdt��tD]}||�r�|j|��	ddd�|rtd	j|���y#t$r|j|�Y��wxYw#1swY�FxYw)
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�	tj|�y#ttf$rYywxYw)NFT)rhri�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: {})
rQr^r_rwrR�evalr}�warnings�catch_warnings�filterwarnings�DeprecationWarning�
ImportWarningrS)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�AD2�D2�D/�.D/�2D;�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��tjd�tjv}tj
j
�}	|jd��}t|�dk(r|rd}t|�d�y	td�|D��}|jd	k(ry|j�}d
|j�d�}|t usJ|��y#t$r|jdg�}Y��wxYw#t$r|rd}t|�d�YywxYw)zx
    Entry point for Array API implementation can be found with importlib and
    returns the main numpy namespace.
    �platlib�	array_api)�grouprz%No entry points for 'array_api' foundNc3�@K�|]}|jdk(s�|���y�w)ruNrT)�.0�eps  r�	<genexpr>z-test_array_api_entry_point.<locals>.<genexpr>�s����<�����G�);�"�<�s��z%'numpy' not in array_api entry pointsznumpy.array_apiznumpy entry point value 'z0' does not point to our Array API implementation)�	sysconfig�get_pathrr7rh�metadata�entry_points�selectr}�getr%r_�next�
StopIteration�value�loadru)�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�<�
<��
�x�x�$�$�	�	����B�
#�B�H�H�:�.9�	9����;����;��C�*�
����b�)��*���� �9�C� ��%�4�/��	�s$�C	�7C*�	C'�&C'�*D�Dc���d�}d�}|tj�}||�}|tj��}||�}||k(sJd|j|�����y)z�
    Checks if `dir(np)` and `np.__all__` are consistent and return
    the same content, excluding exceptions and private members.
    c�P�|D�chc]}|jd�r�|��c}Scc}w)Nra)rj)�
member_set�ms  r�_remove_private_memberszFtest_main_namespace_all_dir_coherence.<locals>._remove_private_members�s!��%�?�a�Q�\�\�#�->��?�?��?s�#�#c�&�|jdh�S)N�bool)�
difference)r�s r�_remove_exceptionszAtest_main_namespace_all_dir_coherence.<locals>._remove_exceptions�s���$�$��&
��	rzMembers that break symmetry: N)rrg�__dir__�symmetric_difference)r�r��all_members�dir_memberss    r�%test_main_namespace_all_dir_coherencer��so��
@��
*�"�*�*�5�K�$�[�1�K�)�"�*�*�,�7�K�$�[�1�K��+�%��'��+�+�K�8�
9�	;��%rz:ignore:numpy.core(\.\w+)? is deprecated:DeprecationWarningc��ddlm}ttj�D]�}|jd�s|dvsd|��tvr�$ttj|�}tj|�rT|}|}t|�D]A}|jd�r�t||�}td|��|g��}|t||�ur�AJ���|t||�ur��J�y)	zp
    Check that all "semi-public" members of `numpy._core` are also accessible
    from `numpy.core` shims.
    rNra)�testsrCrF�__znumpy.core.)�fromlist)�
numpy.corerr	rr5rjrRr
�inspect�ismodule�
__import__)r�member_name�member�	submodule�submodule_name�submodule_member_name�submodule_member�core_submodules        r�test_core_shims_coherencer�s�����2�8�8�}�"8��
�"�"�3�'��2�2���}�%�)?�?������;�/��
���F�#��I�(�N�),�Y��

�%�(�3�3�D�9��#*�9�6K�#L� �!+�!�.�!1�2�3�4�"��
(�7�"�$9�,����

� �W�T�;�7�7�7�7�E"8rc��ddlm}m}m}m}m}m}ddlm}th}t�}t�}	g}
tg}t|�dkD�r�|j�}t|�D�]x}
t||
�}t!j"|�rXd|j$vrJ|
j'd�s9d|j$vr+|
dvr'||vr#|j)|�|j+|��}t!j,|�st/||tj0f�s��||vr�|j$dvr|j$dk(r��|j$d	k(r|j$j'd
�r��|j$dvr|j$dk(r��|j$d
k(r��,|
j)|j$|j$|	|f���Y|j+|�|j$|	|<��{t|�dkDr���~~~	t|
�dk(sJ|
��y)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.
    r)�Any�Callable�Dict�List�Set�Tuple)�_ArrayFunctionDispatcherrura�numpy._core)r>r@rr�)�absolute�arccos�arccosh�arcsin�arcsinh�arctan�arctan2�arctanh�
left_shift�right_shift�	conjugate�invert�	remainder�divide�concatenate�power�	transpose�trimcoefznumpy.polynomial��add�equal�	not_equal�greater�
greater_equal�less�
less_equal�
numpy.stringsrJN)rDr�r�r�r�r�r��numpy._core._multiarray_umathr�rr&�dictr%�popr	r
r�r�rrjr^r��
isfunctionrk�ufunc)r�r�r�r�r�r��dispatched_function�visited_modules�visited_functions�functions_original_paths�duplicated_functions�
modules_queuerr�r�s               r�test_functions_single_locationr�:s��=�<��/1�T�O�14���?C�f��)+���D�M�

�m�
�q�
 ��"�"�$���v�;�P	G�K��V�[�1�F�� � ��(��6�?�?�*��*�*�3�/��V�_�_�4��#E�E��o�-��$�$�V�,��#�#�F�+��"�"�6�*��6�$7����#B�C��.�.����,��&���7�2� ����:�5����2�2�3E�F� ����+��!�/�/�_�<� ����,�6� �)�/�/�������1�&�9�;��&�)�)�&�1�7=���,�V�4�aP	G�	�m�
�q�
 �l	�?�,D��#�$��)�?�+?�?�)rc��tg}th}t�}g}t|�dkD�r�|j�}t	|�D�]�}t||�}t
j|�rXd|jvrJ|jd�s9d|jvr+|dvr'||vr#|j|�|j|��}t
j|�r��t|d�s��|jjd�r��|j|jk7s��||vs��|jdvr|jdk(r��|jd	k(r|jdk(s|jd
k(r|jdk(r��7|jdvr��G|jt|j|j|j�
��|j|����t|�dkDr���|rt|�dk(sJ|��yy)Nrrurar�)
�charrr;r>r@�lapack_lite�mrecordsrr�rArD�mtrand�
bit_generatorrr�r�rrrK)	�BitGenerator�	Generator�MT19937�PCG64�	PCG64DXSM�Philox�RandomState�SFC64�SeedSequence)�Func�actual�expected)rr&r%r�r	r
r�r�rrjr^r�rrr��r�r�r��incorrect_entriesrr�r�s       r�test___module___attributer�s����D�M��d�O������

�m�
�q�
 ��"�"�$���v�;�5	.�K��V�[�1�F�� � ��(��6�?�?�*��*�*�3�/��V�_�_�4��$��
�o�-��$�$�V�,��#�#�F�+��$�$�V�,���
�+��O�O�.�.�s�3��!�!�V�_�_�4��/�/��?�?�'���o�o��8���_�_�
�2�v���'�7Q��_�_��0�V�_�_��5S���?�?�'���!�(�(��#�_�_�%�0�0�!'�����"�%�%�f�-�k5	.��m�
�q�
 �r��$�%��*�=�,=�=�*�r�returnc�F�|j}|j}|j}||jd�dk(sJ�tj
|}t
jt|jd�|�}||uxs"|jd�xr|j|k(S)Nr���znumpy.random)
�__qualname__rr�splitr�modules�	functools�reducer
rj)�obj�qualnamerr
r�
actual_objs      r�_check___qualname__r�s������H��<�<�D��.�.�K��8�>�>�#�&�r�*�*�*�*�
�[�[��
%�F��!�!�'�8�>�>�#�+>��G�J��c��	
�
�"�"�>�2�
0��#�#�x�/�rc�"�tg}th}t�}g}t|�dkD�rN|j�}t	|�D�]}t||�}t
j|�rXd|jvrJ|jd�s9|dvr5d|jvr'||vr#|j|�|j|��}t
j|�r��t|d�s��|jjd�r��|jd�r��t|�r��||vs��|jt|j|j���|j|���"t|�dkDr��N|rt|�dk(sJ|��yy)Nrrura)r>r@r�rrDr�r;r�r�r)rr)rr&r%r�r	r
r�r�rrjr^r�rrr�rrs       r�test___qualname___attributerss���D�M��d�O������

�m�
�q�
 ��"�"�$���v�;�	.�K��V�[�1�F�� � ��(��6�?�?�*��*�*�3�/��$���V�_�_�4��o�-��$�$�V�,��#�#�F�+��$�$�V�,���
�+��O�O�.�.�s�3��*�*�3�/�'��/��/�/�!�(�(��%�2�2�V�_�_���
"�%�%�f�-�;	.��m�
�q�
 �B��$�%��*�=�,=�=�*�rr*)/rrr�rrZrlrhr�r�rur�
numpy.testingr�pytestr3r|rr�mark�skipif�parametrizer#r(r-r0r:rQ�version_inforRrSrUr]r�rdrnryr��xfail�get_config_varr�r�r�r�rr�rr)�ss0r�<module>rs����
����������!�
���
�$������G�$<��=�������)��-��.�>��*-��
�
�����F�d�N�@��B�5�B�5�(!)�!�1�(�Q�,�!��D���g���
�	���1��	�	�N���-6�-��x�!�|�-��\���g���8
�:$���1��:$�:��z�"���g��0�1�I��I������E�F�F�G�F�,�����g�����K�1G�h-8�`������I���Z�(��>�	8���.��.�b�2�����A��)8��)8�Xp@�f@>�F���$(>��_��
�F���v!��F	��(-��^:$s)�G*�8G8�G=�4H�H�*G5�4G5

Youez - 2016 - github.com/yon3zu
LinuXploit