Ë
    6Š·jÓA  ã                   óØ   — 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m	Z	 g d¢Z
 e	d«      d„ «       Z e	d«      d„ «       Zd„ Zd	„ Zdadadd
„Zdd„Z e	d«      dd„«       Zd„ Zd„ Zd„ Zy)é    N)Úndarray)Ú
set_module)Úget_includeÚinfoÚshow_runtimeÚnumpyc                  ó  — ddl m }  ddlm}m}m} t
        j                  t        j                  t        j                  «       dœg}g g }}|D ]*  }||   r|j                  |«       Œ|j                  |«       Œ, |j                  d|||dœi«       |j                  dt
        j                  j                  j                  d«       i«       	 dd	lm} |j#                   |«       «        | |«       y# t$        $ r t'        d
«       Y Œw xY w)a(  
    Print information about various resources in the system
    including available intrinsic support and BLAS/LAPACK library
    in use

    .. versionadded:: 1.24.0

    See Also
    --------
    show_config : Show libraries in the system on which NumPy was built.

    Notes
    -----
    1. Information is derived with the help of `threadpoolctl <https://pypi.org/project/threadpoolctl/>`_
       library if available.
    2. SIMD related information is derived from ``__cpu_features__``,
       ``__cpu_baseline__`` and ``__cpu_dispatch__``

    r   )Úpprint©Ú__cpu_baseline__Ú__cpu_dispatch__Ú__cpu_features__)Únumpy_versionÚpythonÚunameÚsimd_extensions)ÚbaselineÚfoundÚ	not_foundÚ&ignore_floating_point_errors_in_matmulN)Úthreadpool_infoz¨WARNING: `threadpoolctl` not found in system! Install it by `pip install threadpoolctl`. Once installed, try `np.show_runtime` again for more detailed build information)r
   Únumpy._core._multiarray_umathr   r   r   ÚnpÚ__version__ÚsysÚversionÚplatformr   ÚappendÚ_coreÚ_multiarray_umathÚ_blas_supports_fpeÚthreadpoolctlr   ÚextendÚImportErrorÚprint)	r
   r   r   r   Úconfig_foundÚfeatures_foundÚfeatures_not_foundÚfeaturer   s	            úK/root/workspace/.venv/lib/python3.12/site-packages/numpy/lib/_utils_impl.pyr   r      s  € õ* ÷ñ ô Ÿ™Ü—+‘+Ü—‘Ó!ñ
ð €Lð
 *,¨RÐ&€NØ#ò /ˆØ˜GÒ$Ø×!Ñ! 'Õ*à×%Ñ% gÕ.ð	/ð
 ×ÑØØ(Ø#Ø+ñ
ðô ð ×ÑØ0Ü—‘×*Ñ*×=Ñ=¸dÓCÐCðô ð
6Ý1Ø×Ñ™OÓ-Ô.ñ ˆ<Õøô ò 6Üð 5ö 	6ð6ús   ÃC1 Ã1DÄDc                  óT  — ddl } | j                  €Jt        j                  j	                  t        j                  j                  | j                  «      dd«      }|S ddlm} t        j                  j	                  t        j                  j                  |j                  «      d«      }|S )aÃ  
    Return the directory that contains the NumPy \*.h header files.

    Extension modules that need to compile against NumPy may need to use this
    function to locate the appropriate include directory.

    Notes
    -----
    When using ``setuptools``, for example in ``setup.py``::

        import numpy as np
        ...
        Extension('extension_name', ...
                  include_dirs=[np.get_include()])
        ...

    Note that a CLI tool ``numpy-config`` was introduced in NumPy 2.0, using
    that is likely preferred for build systems other than ``setuptools``::

        $ numpy-config --cflags
        -I/path/to/site-packages/numpy/_core/include

        # Or rely on pkg-config:
        $ export PKG_CONFIG_PATH=$(numpy-config --pkgconfigdir)
        $ pkg-config --cflags
        -I/path/to/site-packages/numpy/_core/include

    Examples
    --------
    >>> np.get_include()
    '.../site-packages/numpy/core/include'  # may vary

    r   Nr   Úinclude)	r   Úshow_configÚosÚpathÚjoinÚdirnameÚ__file__Únumpy._corer   )r   Údr   s      r*   r   r   M   sq   € óF Ø×ÑÐ ä�G‰G�L‰LœŸ™Ÿ™¨¯©Ó8¸'À9ÓMˆð
 €Hõ 	$Ü�G‰G�L‰LœŸ™Ÿ™¨¯©Ó8¸)ÓDˆØ€Hó    c                 óÆ   — t         j                  }| D ]6  }t        |j                  «       «      }|sŒt	        |t        |«      |z
  «      }Œ8 |t         j                  k(  rd}|S )zU
    Determines the leading whitespace that could be removed from all the lines.
    r   )r   ÚmaxsizeÚlenÚlstripÚmin)ÚlinesÚindentÚlineÚcontents       r*   Ú_get_indentr?   {   s\   € ô �[‰[€FØò 6ˆÜ�d—k‘k“mÓ$ˆÚÜ˜¤ T£¨WÑ!4Ó5‰Fð6ð ”—‘ÒØˆØ€Mr5   c                 ó   — t        | «      }|}| }d}|j                  |«      }|D ]V  }||k(  rd}	n|}	|t        |«      z   t        |	«      z   }||kD  r#|dz   t        |«      z   }|dz   d|dz   z  z   |z   }ŒO||	z   |z   }ŒX |S )Nz, Ú é   z,
ú é   )r8   Úsplit)
ÚnameÚ	argumentsÚwidthÚ
firstwidthÚkÚnewstrÚsepstrÚarglistÚargumentÚaddstrs
             r*   Ú_split_linerP   ’   s©   € Ü�T“€JØ€AØ€FØ€FØ�o‰o˜fÓ%€GØò 
0ˆØ�
Š?Ø‰FàˆFØ”�H“Ñ¤ F£Ñ+ˆØˆuŠ9Ø˜Q‘¤ X£Ñ.ˆAØ˜e‘^ c¨Z¸!©^Ñ&<Ñ<¸xÑG‰Fà˜f‘_ xÑ/‰Fð
0ð €Mr5   c                 óè  — t        | t        «       t        «       g «      } | j                  | j                  i}| j                  g}| j                  g}	 t        |«      dk(  r	 ||fS |j                  d«      }|j                  «       D ]j  }t        ||   t        j                  «      sŒ!||   j                  }||vsŒ5||   j                  }|j                  |«       |j                  |«       |||<   Œl Œ¢)Nr   )Ú
__import__ÚglobalsÚlocalsÚ__name__Ú__dict__r8   ÚpopÚkeysÚ
isinstanceÚtypesÚ
ModuleTyper   )ÚmoduleÚthedictÚdictlistÚ
totraverseÚthisdictÚxÚmodnameÚmoddicts           r*   Ú_makenamedictrd   «   sç   € Ü˜¤£	¬6«8°RÓ8€FØ�‰ §¡Ð0€GØ—‘Ð €HØ—/‘/Ð"€JØ
Üˆz‹?˜aÒØð �HÐÐð —>‘> !Ó$ˆØ—‘“ò 	/ˆAÜ˜( 1™+¤u×'7Ñ'7Õ8Ø" 1™+×.Ñ.�Ø (Ò*Ø& q™k×2Ñ2�GØ—O‘O GÔ,Ø×%Ñ% gÔ.Ø'.�G˜GÒ$ð	/ð	 r5   c                 ó  — d}d}d„ }t        | dt        | «      «      }t        |d|«      }| j                  }| j                  j                  }|€t
        j                  }t        d||¬«       t        d| j                  |¬«       t        d	||¬«       t        d
| j                  |¬«       t        d || j                  j                  «      |¬«       t        d || j                  j                  «      |¬«       t        d| j                  j                  |¬«       t        dt        | j                  j                   j"                  «      › |› �|¬«       t        dd|¬«       |dv r$t        |› t
        j                  › |› �|¬«       d}	nP|dk(  r&t        |› d|› �|¬«       t
        j                  dk7  }	n%t        |› d|› �|¬«       t
        j                  dk7  }	t        d ||	«      |¬«       t        d| j                  › �|¬«       y)aO  Provide information about ndarray obj.

    Parameters
    ----------
    obj : ndarray
        Must be ndarray, not checked.
    output
        Where printed output goes.

    Notes
    -----
    Copied over from the numarray module prior to its removal.
    Adapted somewhat as only numpy is an option now.

    Called by info.

    rA   c                 ó   — | S ©N© )ra   s    r*   ú<lambda>z_info.<locals>.<lambda>Ó   s   € �1€ r5   Ú	__class__rU   Nzclass: ©Úfilezshape: z	strides: z
itemsize: z	aligned: zcontiguous: z	fortran: zdata pointer: zbyteorder: rC   )Úendrl   )ú|ú=Fú>ÚbigÚlittlez
byteswap: ztype: )ÚgetattrÚtypeÚstridesÚdtypeÚ	byteorderr   Ústdoutr%   ÚshapeÚitemsizeÚflagsÚalignedÚ
contiguousÚfortranÚhexÚctypesÚ_as_parameter_Úvalue)
ÚobjÚoutputÚextraÚticÚbpÚclsÚnmru   ÚendianÚbyteswaps
             r*   Ú_inforŒ   ¿   s´  € ð$ €EØ
€CÙ	€BÜ
�#�{¤D¨£IÓ
.€CÜ	��j #Ó	&€BØ�k‰k€GØ�Y‰Y× Ñ €Fà€~Ü—‘ˆä	ˆ)�R˜fÕ%Ü	ˆ)�S—Y‘Y VÕ,Ü	ˆ+�w VÕ,Ü	ˆ,˜Ÿ™¨6Õ2Ü	ˆ+‘r˜#Ÿ)™)×+Ñ+Ó,°6Õ:Ü	ˆ.™"˜SŸY™Y×1Ñ1Ó2¸Õ@Ü	ˆ+�s—y‘y×(Ñ(¨vÕ6Ü	Ø
œ˜SŸZ™Z×6Ñ6×<Ñ<Ó=Ð>¸u¸gÐFØõ
ô 
ˆ-˜S vÕ.Ø�ÑÜ��”c—m‘m�_ S EÐ*°Õ8Ø‰Ø	�3ŠÜ���S˜˜Ð VÕ,Ü—=‘= EÑ)‰ä���V˜C˜5Ð!¨Õ/Ü—=‘= HÑ,ˆÜ	ˆ,™˜8›¨6Õ2Ü	ˆF�3—9‘9�+Ð
 VÖ,r5   c                 ón  — ddl }ddl}t        | d«      st        | d«      r| j                  } nt        | d«      r| j                  } |€t
        j                  }| €t        t        «       yt        | t        «      rt        | |¬«       yt        | t        «      rÃt        €t        |«      \  aad}g }t        D ]y  }	 t        |   |    }	t        |	«      |v rt!        d|› d�|¬	«       nF|j#                  t        |	«      «       t!        d
|› d�|¬	«       t        |	«       t!        d|z  |¬	«       |dz  }Œ{ |dk(  rt!        d| › d�|¬	«       yt!        d|› d�|¬	«       y|j'                  | «      s|j)                  | «      r{| j*                  }
	 t        |j-                  | «      «      }t1        |
|z   «      |kD  rt3        |
||«      }n|
|z   }t!        d|z   dz   |¬	«       t!        |j5                  | «      |¬	«       y|j7                  | «      �rJ| j*                  }
	 t        |j-                  | «      «      }t1        |
|z   «      |kD  rt3        |
||«      }n|
|z   }t!        d|z   dz   |¬	«       |j5                  | «      }|€3t        | d«      rCt!        |j5                  | j8                  «      |¬	«       nt!        |j5                  | «      |¬	«       |j;                  | «      }|D �cg c]  }|d   dk7  sŒ|‘Œ }}|r^t!        d|¬	«       |D ]K  }t=        | |d«      }|�'|j?                  |j5                  |«      xs d«      \  }}t!        d|› d› �|¬	«       ŒM yyt        | d«      rt!        |j5                  | «      |¬	«       yy# t$        $ r Y �ŒÔw xY w# t.        $ r d}Y �Œøw xY w# t.        $ r d}Y �Œ}w xY wc c}w )a‹  
    Get help information for an array, function, class, or module.

    Parameters
    ----------
    object : object or str, optional
        Input object or name to get information about. If `object` is
        an `ndarray` instance, information about the array is printed.
        If `object` is a numpy object, its docstring is given. If it is
        a string, available modules are searched for matching objects.
        If None, information about `info` itself is returned.
    maxwidth : int, optional
        Printing width.
    output : file like object, optional
        File like object that the output is written to, default is
        ``None``, in which case ``sys.stdout`` will be used.
        The object has to be opened in 'w' or 'a' mode.
    toplevel : str, optional
        Start search at this level.

    Notes
    -----
    When used interactively with an object, ``np.info(obj)`` is equivalent
    to ``help(obj)`` on the Python prompt or ``obj?`` on the IPython
    prompt.

    Examples
    --------
    >>> np.info(np.polyval) # doctest: +SKIP
       polyval(p, x)
         Evaluate the polynomial p at x.
         ...

    When using a string for `object` it is possible to get multiple results.

    >>> np.info('fft') # doctest: +SKIP
         *** Found in numpy ***
    Core FFT routines
    ...
         *** Found in numpy.fft ***
     fft(a, n=None, axis=-1)
    ...
         *** Repeat reference found in numpy.fft.fftpack ***
         *** Total of 3 references found. ***

    When the argument is an array, information about the array is printed.

    >>> a = np.array([[1 + 2j, 3, -4], [-5j, 6, 0]], dtype=np.complex64)
    >>> np.info(a)
    class:  ndarray
    shape:  (2, 3)
    strides:  (24, 8)
    itemsize:  8
    aligned:  True
    contiguous:  True
    fortran:  False
    data pointer: 0x562b6e0d2860  # may vary
    byteorder:  little
    byteswap:  False
    type: complex64

    r   NÚ_ppimport_importerÚ_ppimport_moduleÚ_ppimport_attr)r„   z$
     *** Repeat reference found in z *** rk   z     *** Found in z ***ú-rB   z	Help for z not found.z
     *** Total of z references found. ***z()rC   ú
Ú__init__Ú_z

Methods:
ÚNonez  z  --  Ú__doc__) ÚinspectÚpydocÚhasattrr�   r�   r   rx   r   rY   r   rŒ   ÚstrÚ	_namedictrd   Ú	_dictlistÚidr%   r   ÚKeyErrorÚ
isfunctionÚismethodrU   Ú	signatureÚ	Exceptionr8   rP   ÚgetdocÚisclassr“   Ú
allmethodsrs   Úsplitdoc)ÚobjectÚmaxwidthr„   Útoplevelr—   r˜   ÚnumfoundÚobjlistÚnamestrrƒ   rF   rG   ÚargstrÚdoc1ÚmethodsÚmethÚpublic_methodsÚthisobjÚmethstrÚothers                       r*   r   r   õ   s«  € óD Ûä�Ð,Ô-Ü�6Ð-Ô.Ø×(Ñ(‰Ü	�Ð)Ô	*Ø×&Ñ&ˆà€~Ü—‘ˆà€~ÜŒT�
Ü	�FœGÔ	$Üˆf˜VÖ$Ü	�FœCÔ	 ÜÐÜ#0°Ó#:Ñ ˆI�yØˆØˆÜ ò 	ˆGðÜ Ñ(¨Ñ0�Ü�c“7˜gÑ%ÜÐAÀ'ÀÈ%ÐPØ%öð —N‘N¤2 c£7Ô+ÜÐ.¨w¨i°tÐ<À6ÕJÜ˜”IÜ˜# ™.¨vÕ6Ø˜A‘‘ð	ð �qŠ=Ü�I˜f˜X [Ð1¸Ö?äð "Ø"* Ð+AðCàöð
 
×	Ñ	˜FÔ	# w×'7Ñ'7¸Ô'?Ø�‰ˆð	Ü˜G×-Ñ-¨fÓ5Ó6ˆIô ˆt�iÑÓ  8Ò+Ü   y°(Ó;‰Fà˜IÑ%ˆFäˆc�F‰l˜TÑ!¨Õ/Üˆg�n‰n˜VÓ$¨6Ö2à	�‰˜Õ	 Ø�‰ˆð	Ü˜G×-Ñ-¨fÓ5Ó6ˆIô ˆt�iÑÓ  8Ò+Ü   y°(Ó;‰Fà˜IÑ%ˆFäˆc�F‰l˜TÑ!¨Õ/Ø�~‰~˜fÓ%ˆØˆ<Ü�v˜zÔ*Ü�g—n‘n V§_¡_Ó5¸FÖCä�'—.‘. Ó(¨vÕ6à×"Ñ" 6Ó*ˆà+2ÖE 4°d¸1±gÀ³nš$ÐEˆÐEÙÜÐ"¨Õ0Ø&ò ?�Ü! &¨$°Ó5�ØÐ&Ø%*§^¡^Ø#ŸN™N¨7Ó3Ò=°vó&‘N�G˜Uô ˜˜4˜&  w iÐ0°vÖ>ñ?ð ô 
�˜Ô	#Üˆg�n‰n˜VÓ$¨6Ö2ð 
$øôu ò Úðûô ò 	Ø‹Ið	ûô ò 	Ø‹Ið	üò$ FsC   Â:A6M>Æ
N ÈN  ËN2Ë-N2Í>	NÎ
NÎNÎNÎ N/Î.N/c                 ód  — | j                   dk(  r|S | j                  d|¬«      }t        j                  |«      }t        j                  j                  |«      r|j                  d«      }|j                  «       s|S t        |t        j                  «      r|S t        j                  |||¬«       |S )a{  
    Utility function to check median result from data for NaN values at the end
    and return NaN in that case. Input result can also be a MaskedArray.

    Parameters
    ----------
    data : array
        Sorted input data to median function
    result : Array or MaskedArray
        Result of median function.
    axis : int
        Axis along which the median was computed.

    Returns
    -------
    result : scalar or ndarray
        Median or NaN in axes which contained NaN in the input.  If the input
        was an array, NaN will be inserted in-place.  If a scalar, either the
        input itself or a scalar NaN.
    r   éÿÿÿÿ)ÚaxisF)Úwhere)ÚsizeÚtaker   ÚisnanÚmaÚisMaskedArrayÚfilledÚanyrY   ÚgenericÚcopyto)ÚdataÚresultr·   Úpotential_nansÚns        r*   Ú_median_nancheckrÆ   —  s�   € ð* ‡y�y�A‚~ØˆØ—Y‘Y˜r¨�YÓ-€NÜ
�‰�Ó €Aô 
‡u�u×Ñ˜1ÔØ�H‰H�U‹Oˆà�5‰5Œ7Øˆô �&œ"Ÿ*™*Ô%ØÐô ‡I�Iˆf�n¨AÕ.Ø€Mr5   c                  ó´   — ddl m} m}m} t	        | «      dk(  rt	        |«      dk(  rydj                  | «      }|D ]  }||   r
|d|› d�z  }Œ|d|› d�z  }Œ |S )aÇ  
    Returns a string containing the CPU features supported
    by the current build.

    The format of the string can be explained as follows:
        - Dispatched features supported by the running machine end with `*`.
        - Dispatched features not supported by the running machine
          end with `?`.
        - Remaining features represent the baseline.

    Returns:
        str: A formatted string indicating the supported CPU features.
    r   r   rA   rC   Ú*ú?)r   r   r   r   r8   r0   )r   r   r   Úenabled_featuresr)   s        r*   Ú	_opt_inforË   Á  s�   € ÷ñ ô ÐÓ Ò!¤cÐ*:Ó&;¸qÒ&@Øà—x‘xÐ 0Ó1ÐØ#ò /ˆØ˜GÒ$Ø ! G 9¨A Ñ.Ñà ! G 9¨A Ñ.Ñð	/ð Ðr5   c                óÒ  — | j                   �à| j                  du}g }g }g }g }| j                   j                  «       D ]v  \  }}t        |d   «      }||d   urd}|j	                  |«       |j	                  |«       |j	                  |d   «       |j	                  t        |«      dk  rdn|d   «       Œx |s| S ||||| j                  dœ}	t        j                  |	| j                  ¬«      S | j                  �C| j                  \  }
}t        |
«      }| j                  €||
u r| S t        j                  ||f«      S | j                  €| S t        j                  | j                  «      S )	a¹  
    Returns the dtype unchanged if it contained no metadata or a copy of the
    dtype if it (or any of its structure dtypes) contained metadata.

    This utility is used by `np.save` and `np.savez` to drop metadata before
    saving.

    .. note::

        Due to its limitation this function may move to a more appropriate
        home or change in the future and is considered semi-public API only.

    .. warning::

        This function does not preserve more strange things like record dtypes
        and user dtypes may simply return the wrong thing.  If you need to be
        sure about the latter, check the result with:
        ``np.can_cast(new_dtype, dtype, casting="no")``.

    Nr   TrB   é   rD   )ÚnamesÚformatsÚoffsetsÚtitlesrz   )Úalign)ÚfieldsÚmetadataÚitemsÚdrop_metadatar   r8   rz   r   rv   ÚisalignedstructÚsubdtyperš   )rv   Úfound_metadatarÎ   rÏ   rÐ   rÑ   rF   ÚfieldÚfield_dtÚ	structurerØ   ry   Únew_subdtypes                r*   rÖ   rÖ   á  s`  € ð* ‡|�|ÐØŸ™¨tÐ3ˆàˆØˆØˆØˆØ Ÿ<™<×-Ñ-Ó/ò 	@‰KˆD�%Ü$ U¨1¡XÓ.ˆHØ˜u Q™xÑ'Ø!%�à�L‰L˜ÔØ�N‰N˜8Ô$Ø�N‰N˜5 ™8Ô$Ø�M‰M¤# e£*¨q¢.™$°e¸A±hÕ?ð	@ñ ØˆLð  w¸7ÈfØŸ™ñ(ˆ	ô
 �x‰x˜	¨×)>Ñ)>Ô?Ð?Ø	�‰Ð	#àŸ.™.‰ˆ�%Ü$ XÓ.ˆØ�>‰>Ð! l°hÑ&>ØˆLä�x‰x˜ uÐ-Ó.Ð.ð �>‰>Ð!ØˆLä�x‰x˜Ÿ	™	Ó"Ð"r5   )r   rg   )NéL   Nr   )r.   r   r   rZ   r   r   r3   r   Únumpy._utilsr   Ú__all__r   r   r?   rP   r›   rœ   rd   rŒ   r   rÆ   rË   rÖ   rh   r5   r*   ú<module>rá      s£   ðÛ 	Û Û 
Û ã Ý Ý #ò€ñ
 ˆGÓñ:ó ð:ñz ˆGÓñ*ó ð*òZò.ð( €	Ø€	óó(3-ñl ˆGÓò^3ó ð^3òB(òTó@<#r5   