
    (ph                        S SK r S SKrS SKrS SKrS SKrS SKrS SKrS SKrSSKJ	r	  S SK
JrJrJr  S SKJrJrJr  S SKr/ SQrS rS r " S	 S
5      rS rS rS rS rSS jrS rSqSqSS jr SS jr!\	" S5      S S j5       r"\	" S5      \RF                  4S j5       r$0 r%\RL                  " S\RN                  5      r(\	" S5        S!S j5       r)S r*S r+S r,S r-S r.S r/g)"    N   )
set_module)issubclass_issubsctype
issubdtype)ndarrayufuncasarray)r   r   r   	deprecatedeprecate_with_docget_includeinfosourcewholookforbyte_bounds	safe_evalshow_runtimec                     SSK Jn JnJn  SSKJn  [
        R                  [        R                  [        R                  " 5       S./n/ / peU H0  nX   (       a  UR                  U5        M  UR                  U5        M2     UR                  SUUUS.05         SSKJn  UR                  U" 5       5        U" U5        g	! [         a    [!        S5         N f = f)
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   __cpu_features____cpu_baseline____cpu_dispatch__)pprint)numpy_versionpythonunamesimd_extensions)baselinefound	not_found)threadpool_infozWARNING: `threadpoolctl` not found in system! Install it by `pip install threadpoolctl`. Once installed, try `np.show_runtime` again for more detailed build informationN)numpy.core._multiarray_umathr   r   r   r   np__version__sysversionplatformr   appendthreadpoolctlr"   extendImportErrorprint)	r   r   r   r   config_foundfeatures_foundfeatures_not_foundfeaturer"   s	            B/var/www/html/venv/lib/python3.13/site-packages/numpy/lib/utils.pyr   r      s    (  ++!
 L
 *,R&#$!!'*%%g.	 $
 (#+
 61O-. <  6 5 	66s   B= =CCc                  V   SSK n U R                  cJ  [        R                  R	                  [        R                  R                  U R                  5      SS5      nU$ SSKJn  [        R                  R	                  [        R                  R                  UR                  5      S5      nU$ )a|  
Return the directory that contains the NumPy \*.h header files.

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

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

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

r   Ncoreinclude)	numpyshow_configospathjoindirname__file__
numpy.corer4   )r6   dr4   s      r2   r   r   K   sp    $  GGLL8&)L
 H 	"GGLL7CH    c                   (    \ rS rSrSrSS jrS rSrg)
_Deprecateh   zn
Decorator class to deprecate old functions.

Refer to `deprecate` for details.

See Also
--------
deprecate

Nc                 (    Xl         X l        X0l        g N)old_namenew_namemessage)selfrE   rF   rG   s       r2   __init___Deprecate.__init__t   s      r?   c                   ^^ U R                   nU R                  nU R                  nUc  TR                  nUc  SU-  mOSU< SU< S3mUb  TSU-   -  m[        R
                  " T5      UU4S j5       nXGl        TR                  nUc  TnOUR                  5       R                  S5      n	[        U	SS 5      n
U	S	   R                  5       (       a	  U
S
-  U-   nOC[        U	S	   5      S-   nU	SS  H%  n[        U5      U
:  a    OU[        U5      S-   -  nM'     XS n[        R                  " TS
U
-  5      mSR                  TU/5      nXl        U$ )z*
Decorator call.  Refer to ``decorate``.

Nz`%s` is deprecated!`z` is deprecated, use `z
` instead!
c                  H   > [         R                  " T[        SS9  T" U 0 UD6$ )Nr   )
stacklevel)warningswarnDeprecationWarning)argskwdsdepdocfuncs     r2   newfunc$_Deprecate.__call__.<locals>.newfunc   s$    MM&"4C&&&r?      r    z

)rE   rF   rG   __name__	functoolswraps__doc__
expandtabssplit_get_indentlstriplentextwrapindentr:   )rH   rV   rS   kwargsrE   rF   rG   rW   doclinesre   skiplinerU   s    `           @r2   __call___Deprecate.__call__y   sf   
 ====,,}}H*X5F  *F dWn$F			' 
	' $ll;CNN$**40E qr+FQx   slS( 58}q(!!"ID4y6)CIM)D & %j__VS6\:F++vsm,Cr?   )rG   rF   rE   )NNN)r[   
__module____qualname____firstlineno__r^   rI   rk   __static_attributes__ r?   r2   rA   rA   h   s    	
0r?   rA   c                     [         R                  nU  H=  n[        UR                  5       5      nU(       d  M%  [	        U[        U5      U-
  5      nM?     U[         R                  :X  a  SnU$ )zM
Determines the leading whitespace that could be removed from all the lines.
r   )r&   maxsizerc   rb   min)rh   re   rj   contents       r2   ra   ra      sY     [[Fdkkm$7TW!45F  Mr?   c                  \    U (       a  U S   nU SS n [        U 0 UD6" U5      $ [        U 0 UD6$ )a  
Issues a DeprecationWarning, adds warning to `old_name`'s
docstring, rebinds ``old_name.__name__`` and returns the new
function object.

This function may also be used as a decorator.

Parameters
----------
func : function
    The function to be deprecated.
old_name : str, optional
    The name of the function to be deprecated. Default is None, in
    which case the name of `func` is used.
new_name : str, optional
    The new name for the function. Default is None, in which case the
    deprecation message is that `old_name` is deprecated. If given, the
    deprecation message is that `old_name` is deprecated and `new_name`
    should be used instead.
message : str, optional
    Additional explanation of the deprecation.  Displayed in the
    docstring after the warning.

Returns
-------
old_func : function
    The deprecated function.

Examples
--------
Note that ``olduint`` returns a value after printing Deprecation
Warning:

>>> olduint = np.deprecate(np.uint)
DeprecationWarning: `uint64` is deprecated! # may vary
>>> olduint(6)
6

r   rY   NrA   )rS   rf   fns      r2   r   r      sA    X !WABx4*6*2..4*6**r?   c                     [        U S9$ )aI  
Deprecates a function and includes the deprecation in its docstring.

This function is used as a decorator. It returns an object that can be
used to issue a DeprecationWarning, by passing the to-be decorated
function as argument, this adds warning to the to-be decorated function's
docstring and returns the new function object.

See Also
--------
deprecate : Decorate a function such that it issues a `DeprecationWarning`

Parameters
----------
msg : str
    Additional explanation of the deprecation. Displayed in the
    docstring after the warning.

Returns
-------
obj : object

)rG   rw   )msgs    r2   r   r      s    0 c""r?   c                    U R                   nUS   S   nUS   nUS   n[        U 5      R                  R                  nU=pgUc  XpR                  U-  -  nXg4$ [        XC5       H!  u  pU	S:  a  XhS-
  U	-  -  nM  XxS-
  U	-  -  nM#     Xu-  nXg4$ )a  
Returns pointers to the end-points of an array.

Parameters
----------
a : ndarray
    Input array. It must conform to the Python-side of the array
    interface.

Returns
-------
(low, high) : tuple of 2 integers
    The first integer is the first byte of the array, the second
    integer is just past the last byte of the array.  If `a` is not
    contiguous it will not use every byte between the (`low`, `high`)
    values.

Examples
--------
>>> I = np.eye(2, dtype='f'); I.dtype
dtype('float32')
>>> low, high = np.byte_bounds(I)
>>> high - low == I.size*I.itemsize
True
>>> I = np.eye(2); I.dtype
dtype('float64')
>>> low, high = np.byte_bounds(I)
>>> high - low == I.size*I.itemsize
True

datar   stridesshaperY   )__array_interface__r
   dtypeitemsizesizezip)
aaia_dataastridesashapebytes_aa_lowa_highr~   strides
             r2   r   r     s    @ 
		BZ]F)}H[Faj''GE&&7"" = !2MEz'6))7F**	 3
 	=r?   c                 
   U c+  [         R                  " 5       R                  nUR                  n / n0 nU R	                  5        H  n[        X   [        5      (       d  M  X   n[        U5      nXcR	                  5       ;   a  USX6   -  -   nSnOXCU'   UnSnSR                  [        [        UR                  5      5      n	[        UR                  5      n
UR                  XyXR                  R                  U/5        M     SnSnSnSnU H  nU[!        US   5      :  a  [!        US   5      nU[!        US   5      :  a  [!        US   5      nU[!        US   5      :  a  [!        US   5      nUS   (       d  Mo  U[#        US   5      -  nM     [!        U5      S:  a_  [%        SU5      n[%        SU5      n[%        SU5      nS	US
-  < SUS
-  < SUS
-  < S3n['        US-   S[!        U5      S-   -  -   S-   5        U Ht  n['        US   < S
S
W[!        US   5      -
  S-   -  < S
US   < S
S
W[!        US   5      -
  S-   -  < S
US   < S
S
W[!        US   5      -
  S-   -  < S
US   < 35        Mv     ['        SU-  5        g)a  
Print the NumPy arrays in the given dictionary.

If there is no dictionary passed in or `vardict` is None then returns
NumPy arrays in the globals() dictionary (all NumPy arrays in the
namespace).

Parameters
----------
vardict : dict, optional
    A dictionary possibly containing ndarrays.  Default is globals().

Returns
-------
out : None
    Returns 'None'.

Notes
-----
Prints out the name, shape, bytes and type of all of the ndarrays
present in `vardict`.

Examples
--------
>>> a = np.arange(10)
>>> b = np.ones(20)
>>> np.who()
Name            Shape            Bytes            Type
===========================================================
a               10               80               int64
b               20               160              float64
Upper bound on total bytes  =       240

>>> d = {'x': np.arange(2.0), 'y': np.arange(3.0), 'txt': 'Some str',
... 'idx':5}
>>> np.who(d)
Name            Shape            Bytes            Type
===========================================================
x               2                16               float64
y               3                24               float64
Upper bound on total bytes  =       40

Nz (%s)r   rY   z x r      
   zName rZ   z Shape z Bytes z TyperM   =      z'
Upper bound on total bytes  =       %d)r&   	_getframef_back	f_globalskeys
isinstancer   idr:   mapstrr~   nbytesr)   r   namerc   intmaxr-   )vardictframestacacher   varidvnamestroriginalshapestrbytestrmaxnamemaxshapemaxbyte
totalbytesvalsp1sp2sp3prvals                       r2   r   r   G  sa   X &&//
CEgmW---CS'Cjjl"5:!55!c
zz#c399"56H#**oGJJ7IINN " #   GHGJSQ[ #a&kGc#a&k!3q6{HSQ[ #a&kGq66#c!f+%J  3x!|"g"h"g47GSWc#gNedlS#e*Q,//$67ASSV_Q5F0G(+ASSV_Q5F0G(+ASSV_Q5F0G(+A0 	1 
 

4z
AB
r?   c                    [        U 5      nUnU nSnUR                  U5      nU HW  nXC:X  a  Sn	OUn	U[        U5      -   [        U	5      -   nXB:  a$  US-   [        U5      -   nUS-   SUS-   -  -   U-   nMP  XY-   U-   nMY     U$ )Nz,  rY   z,
rZ   r   )rc   r`   )
r   	argumentswidth
firstwidthknewstrsepstrarglistargumentaddstrs
             r2   _split_liner     s    TJAFFoof%G?FFHF+9QX.Ae^c:a<&888CF_x/F  Mr?   r6   c                    [        U [        5       [        5       / 5      n U R                  U R                  0nU R                  /nU R                  /n [        U5      S:X  a   X4$ UR                  S5      nUR                  5        Ho  n[        XE   [        R                  5      (       d  M&  XE   R                  nXb;  d  M;  XE   R                  nUR                  U5        UR                  U5        XqU'   Mq     M  Nr   )
__import__globalslocalsr[   __dict__rc   popr   r   types
ModuleTyper)   )modulethedictdictlist
totraversethisdictxmodnamemoddicts           r2   _makenamedictr     s    	68R8Fv/G H//"J
z?a  >>!$A(+u'7'788"+..*&k22GOOG,%%g.'.G$ !	 r?   c                    SnSnS n[        U S[        U 5      5      n[        USU5      nU R                  nU R                  R                  nUc  [
        R                  n[        SXaS9  [        SU R                  US9  [        S	XqS9  [        S
U R                  US9  [        SU" U R                  R                  5      US9  [        SU" U R                  R                  5      US9  [        SU R                  R                  US9  [        S[        U R                  R                   R"                  5      < U< 3US9  [        SSUS9  US;   a$  [        U< [
        R                  < U< 3US9  Sn	OOUS:X  a%  [        U< SU< 3US9  [
        R                  S:g  n	O$[        U< SU< 3US9  [
        R                  S:g  n	[        SU" U	5      US9  [        SU R                  -  US9  g)a  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.

r   c                     U $ rD   rq   )r   s    r2   <lambda>_info.<locals>.<lambda>  s    1r?   	__class__r[   Nzclass: filezshape: z	strides: z
itemsize: z	aligned: zcontiguous: z	fortran: zdata pointer: zbyteorder: rZ   )endr   )|r   F>biglittlez
byteswap: ztype: %s)getattrtyper}   r   	byteorderr&   stdoutr-   r~   r   flagsaligned
contiguousfortranhexctypes_as_parameter_value)
objoutputextraticbpclsnmr}   endianbyteswaps
             r2   _infor     s   $ E
C	B
#{DI
.C	j#	&BkkGYY  F~	)R%	)SYYV,	+w,	,62	+r#))++,6:	."SYY112@	+syy((v6	 #CJJ$=$=$C$C DeL
 
-Sv.#s}}c2@	33$62==E)c3'f5==H,	,862	*syy
 v.r?   c                    SSK nSSKn[        U S5      (       d  [        U S5      (       a  U R                  n O[        U S5      (       a  U R                  n Uc  [
        R                  nU c  [        [        5        g[        U [        5      (       a
  [        XS9  g[        U [        5      (       a  [        c  [        U5      u  qqSn/ n[         Hq  n [        U   U    n	[        U	5      U;   a  [!        SU-  US9  O?UR#                  [        U	5      5        [!        S	U-  US9  [        U	5        [!        S
U-  US9  US-  nMs     US:X  a  [!        SU -  US9  g[!        SU-  US9  gUR'                  U 5      (       d  UR)                  U 5      (       as  U R*                  n
 [        UR-                  U 5      5      n[1        X-   5      U:  a  [3        XU5      nOX-   n[!        SU-   S-   US9  [!        UR5                  U 5      US9  gUR7                  U 5      (       GaQ  U R*                  n
 [        UR-                  U 5      5      n[1        X-   5      U:  a  [3        XU5      nOX-   n[!        SU-   S-   US9  UR5                  U 5      nUc5  [        U S5      (       a#  [!        UR5                  U R8                  5      US9  O[!        UR5                  U 5      US9  UR;                  U 5      nU Vs/ s H  oS   S:w  d  M  UPM     nnU(       aa  [!        SUS9  U HP  n[=        XS5      nUb,  UR?                  UR5                  U5      =(       d    S5      u  nn[!        SU< SW< 3US9  MR     gg[        U S5      (       a  [!        UR5                  U 5      US9  gg! [$         a     GM  f = f! [.         a    Sn GNf = f! [.         a    Sn GNf = fs  snf )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.

See Also
--------
source, lookfor

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 %s *** r   z     *** Found in %s ***-rY   zHelp for %s not found.z+
     *** Total of %d references found. ***z()rZ   rM   rI   _z

Methods:
Nonez  z  --  r^   ) pydocinspecthasattrr   r   r&   r   r   r   r   r   r   	_namedictr   	_dictlistr   r-   r)   KeyError
isfunctionismethodr[   	signature	Exceptionrc   r   getdocisclassrI   
allmethodsr   splitdoc)objectmaxwidthr   toplevelr   r   numfoundobjlistr   r   r   r   argstrdoc1methodsmethpublic_methodsthisobjmethstrothers                       r2   r   r     s   L ,--6-..((	)	*	*&&~~T
	FG	$	$f$	FC	 	 #0#: Iy G(0c7g% BDKL%
 NN2c7+4w>VLI#h,V4A !  q=*V3&A :<DE
 
		F	#	#w'7'7'?'?	G--f56I t~) (;F%FcFlT!/gnnV$62		 	 	G--f56I t~) (;F%FcFlT!/~~f%<vz**gnnV__5FC'..(v6""6*+2E741gn$7E"0&!&5&%*^^#NN73=v&NGU g6VD '  
	#	#gnnV$62 
$u    	I	  	I	$ FsC   A-NN* (N= +O;O
N'&N'*N:9N:=OOc                     SSK n [        SUR                  U 5      -  US9  [        UR                  U 5      US9  g! [         a    [        SUS9   gf = f)au  
Print or write to a file the source code for a NumPy object.

The source code is only returned for objects written in Python. Many
functions and classes are defined in C and will therefore not return
useful information.

Parameters
----------
object : numpy object
    Input object. This can be any object (function, class, module,
    ...).
output : file object, optional
    If `output` not supplied then source code is printed to screen
    (sys.stdout).  File object must be created with either write 'w' or
    append 'a' modes.

See Also
--------
lookfor, info

Examples
--------
>>> np.source(np.interp)                        #doctest: +SKIP
In file: /usr/lib/python2.6/dist-packages/numpy/lib/function_base.py
def interp(x, xp, fp, left=None, right=None):
    """.... (full docstring printed)"""
    if isinstance(x, (float, int, number)):
        return compiled_interp([x], xp, fp, left, right).item()
    else:
        return compiled_interp(x, xp, fp, left, right)

The source code is only returned for objects written in Python.

>>> np.source(np.array)                         #doctest: +SKIP
Not available for this object.

r   NzIn file: %s
r   zNot available for this object.)r   r-   getsourcefile	getsourcer  )r  r   r   s      r2   r   r     sV    R =o 5 5f ==FKg'f5 =.V<=s   5< AAz[a-z0-9_]+\(.*[,=].*\)c                   ^^^^^ SSK n[        XU5      m/ n[        U 5      R                  5       R	                  5       mT(       d  gTR                  5        HN  u  nu  pn
U	S;   a  M  UR                  5       m[        U4S jT 5       5      (       d  M=  UR                  U5        MP     SSSSS.mUU4S jmUU4S	 jnUR                  US
9  SSR                  T5      -  nUS[        U5      -  /nUSSS2    H  nTU   u  mpTR                  5       R	                  S5       Vs/ s H*  nUR                  5       (       d  M  UR                  5       PM,     nn US   R                  5       n[        R                  U5      (       a  US   R                  5       nUR                  U< SU< 35        M     U(       d  UR                  S5        Ub!  UR                  SR                  U5      5        g[        U5      S:  a(  UR!                  5       nU" SR                  U5      5        g[#        SR                  U5      5        gs  snf ! [         a    Sn Nf = f)a&  
Do a keyword search on docstrings.

A list of objects that matched the search is displayed,
sorted by relevance. All given keywords need to be found in the
docstring for it to be returned as a result, but the order does
not matter.

Parameters
----------
what : str
    String containing words to look for.
module : str or list, optional
    Name of module(s) whose docstrings to go through.
import_modules : bool, optional
    Whether to import sub-modules in packages. Default is True.
regenerate : bool, optional
    Whether to re-generate the docstring cache. Default is False.
output : file-like, optional
    File-like object to write the output to. If omitted, use a pager.

See Also
--------
source, info

Notes
-----
Relevance is determined only roughly, by checking if the keywords occur
in the function name, at the start of a docstring, etc.

Examples
--------
>>> np.lookfor('binary representation') # doctest: +SKIP
Search results for 'binary representation'
------------------------------------------
numpy.binary_repr
    Return the binary representation of the input number as a string.
numpy.core.setup_common.long_double_representation
    Given a binary dump as given by GNU od -b, look for long double
numpy.base_repr
    Return a string representation of a number in the given base system.
...

r   N)r   r  c              3   ,   >#    U  H	  oT;   v   M     g 7frD   rq   ).0wrg   s     r2   	<genexpr>lookfor.<locals>.<genexpr>2  s     'ACxs   i  )rV   classr   r  c                   > SnSR                  UR                  5       R                  5       R                  S5      S S 5      nU[	        T Vs/ s H  ofU;   d  M
  SPM     sn5      -  nU[	        T Vs/ s H  ofU ;   d  M
  SPM     sn5      -  nU[        U 5      * S-  -  nUTR                  US5      -  nX@R                  S5      * S	-  -  nU[        U* S
-  S5      -  nU$ s  snf s  snf )Nr   rM   r         r   r  .r   d   i)	r:   lowerstripr`   sumrc   getcountr   )	r   docstrkindindexr	first_docr  kind_relevancewhatss	          r2   	relevancelookfor.<locals>.relevance<  s    IIflln224::4@!DE		Su7u!Y#u788	Se1eDy"e122	c$iZ!^	^e,,	jjo""	S%#t$$ 81s   	C"
C"
3	C'
 C'
c                    > T" U /TU    Q76 $ rD   rq   )r   r   r0  s    r2   relevance_value lookfor.<locals>.relevance_valueL  s    &U1X&&r?   )keyzSearch results for '%s'rZ   r   rM   rY   r   z
    zNothing found.r   )r   _lookfor_generate_cacher   r$  r`   itemsallr)   sortr:   rc   r%  _function_signature_research
IndexErrorwritegetpagerr-   )whatr   import_modules
regenerater   r   r    r   	docstringr*  r+  r3  s	help_textixrj   doclinesr-  pagerr   rg   r.  r0  r/  s                      @@@@@r2   r   r     s   ^  $FJGE EIOO##%E*/++-&&y''oo''''LL +8 #T %8N '	JJ?J# 	"SXXe_5ACAJIdddT-0YY[->->t-D %-DTzz| !DJJL-D %	 ))+I%,,Y77$QK--/	 	y9:  )* TYYy)*	Y"	 dii	"#dii	"#-%  	I	s   %IIA IIIc                    SSK nSSKJn  U c  Sn [        U [        5      (       a    [        U 5        [        R                  U    n OR[        U [        5      (       d  [        U [        5      (       a(  0 nU  H  nUR                  [        XaU5      5        M      U$ [        U 5      [        ;   a  U(       d  [        [        U 5         $ 0 nU[        [        U 5      '   0 nSnU R                  U 4/n	U	(       Ga  U	R!                  S5      u  p[        U5      U;   a  M,  SU[        U5      '   US-  nSnUR#                  U5      (       Ga1  Sn UR$                  nU(       Ga`  [)        US	5      (       GaN  UR*                   GH=  n[,        R.                  " U5       GH  n[,        R0                  R3                  X5      n[,        R0                  R3                  XS
5      n[,        R0                  R5                  U5      (       a  UR7                  S5      (       a  USS nO)[,        R0                  R5                  U5      (       a  UnOM  US:X  a  M   [        R8                  n[        R:                  n U" 5       [        l        U" 5       [        l        [        U
< SU< 35        U[        l        U[        l        GM!     GM@     [A        U5       H  u  nn [C        USU
< SU< 35      n[C        USS5      nSU;  a  U(       a	  U< SU< 3nURG                  U
S-   5      (       d  [        U[H        5      (       a  O#Mo  UR#                  U5      (       d  Ub  UU;   d  M  U	RK                  U
< SU< 3U45        M     O[URM                  U5      (       a2  Sn[A        U5       H   u  nnU	RK                  U
< SU< 3U45        M"     O[)        US5      (       a  Sn URO                  U5      nUb  UX4XZ'   U	(       a  GM  U$ ! [         a    0 s $ f = f! [&         a    Sn GNf = f! U[        l        U[        l        f = f! [<         a    e [>         a     GM  f = f! [D         a    U
< SU< 3nSn GN}f = f! [D         a    Sn Nf = f)a  
Generate docstring cache for given module.

Parameters
----------
module : str, None, module
    Module for which to generate docstring cache
import_modules : bool
    Whether to import sub-modules in packages.
regenerate : bool
    Re-generate the docstring cache

Returns
-------
cache : dict {obj_full_name: (docstring, kind, index), ...}
    Docstring cache for the module, either cached one (regenerate=False)
    or newly generated.

r   N)StringIOr6   TrY   r  r   __path__z__init__.pyz.pyrI   r"  r[   rm   r  rk   rV   )(r   iorJ  r   r   r   r,   r&   moduleslisttupleupdater7  r   _lookfor_cachesr[   r   ismodule__all__AttributeErrorr   rK  r8   listdirr9   r:   isfileendswithr   stderrKeyboardInterruptBaseException_getmembersr   	NameError
startswithr	   r)   r  r  )r   rA  rB  r   rJ  r   modseenr+  stackr   itemr*  _allpthmod_paththis_pyinit_py	to_import
old_stdout
old_stderrnv	item_namemod_namerg   s                             r2   r7  r7  n  s   * ~&#	v V$	FD	!	!Z%>%>CLL01;= >  	&z_$Zr&z** E"'OBvJDEoov&'E
YYq\
d8tRX
D!!D||
 '$
";";==C$&JJsO"$'',,s"="$'',,sm"LGGNN733 ( 1 1% 8 8(0"IWW^^G44(0I$$
2$%),J),J8-5Z
-5Z
 *dI+F G-7
-7
- %4 )@ $D)1$ ':$7J KI&q,=H i'H+3Y ?I ++D3J77!!U++ !**1--dq1156+ *, __T""D#D)1q1156 *T:&&D	..&C ?,EKk %n LU  	I	@ " 6 .8
-7
0 "!, % %% ! $ ,0 3I#H	$6  	C	sq   O5 P  P5'2PP5!QQ- 5PPPPP22P55QQQ*)Q*-Q<;Q<c           	          SS K n UR                  U 5      nU$ ! [         aB    [        U 5       Vs/ s H"  n[	        X5      (       d  M  U[        X5      4PM$     Os  snf nn U$ f = fr   )r   
getmembersr  dirr   r   )rb  r   membersr   s       r2   r\  r\    sq    ($$T* N  (25d) ()Qd& )Awt'() ( (N(s     A%AAA%$A%c                 ,    SSK nUR                  U 5      $ )a  
Protected string evaluation.

Evaluate a string containing a Python literal expression without
allowing the execution of arbitrary non-literal code.

.. warning::

    This function is identical to :py:meth:`ast.literal_eval` and
    has the same security implications.  It may not always be safe
    to evaluate large input strings.

Parameters
----------
source : str
    The string to evaluate.

Returns
-------
obj : object
   The result of evaluating `source`.

Raises
------
SyntaxError
    If the code has invalid Python syntax, or if it contains
    non-literal code.

Examples
--------
>>> np.safe_eval('1')
1
>>> np.safe_eval('[1, 2, 3]')
[1, 2, 3]
>>> np.safe_eval('{"foo": ("bar", 10.0)}')
{'foo': ('bar', 10.0)}

>>> np.safe_eval('import os')
Traceback (most recent call last):
  ...
SyntaxError: invalid syntax

>>> np.safe_eval('open("/home/user/.ssh/id_dsa").read()')
Traceback (most recent call last):
  ...
ValueError: malformed node or string: <_ast.Call object at 0x...>

r   N)astliteral_eval)r   rt  s     r2   r   r     s    d F##r?   c                 z   U R                   S:X  a  U$ U R                  SUS9n[        R                  " U5      n[        R                  R                  U5      (       a  UR                  S5      nUR                  5       (       d  U$ [        U[        R                  5      (       a  U$ [        R                  " XUS9  U$ )a7  
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   r6  )axisF)where)r   taker$   isnanmaisMaskedArrayfilledanyr   genericcopyto)r|   resultrw  potential_nansrk  s        r2   _median_nancheckr  9  s    * yyA~YYrY-N
 A 
uu1HHUO5577 &"**%% IIfA.Mr?   c                      SSK Jn JnJn  [	        U5      S:X  a  [	        U5      S:X  a  gSR                  U5      nU H   nX   (       a  USU S3-  nM  USU S3-  nM"     U$ )ai  
Returns a string contains the supported CPU features by the current build.

The string format can be explained as follows:
    - dispatched features that are supported by the running machine
      end with `*`.
    - dispatched features that are "not" supported by the running machine
      end with `?`.
    - remained features are representing the baseline.
r   r   r   rZ   *?)r#   r   r   r   rc   r:   )r   r   r   enabled_featuresr1   s        r2   	_opt_infor  c  sz      !c*:&;q&@xx 01#$!G9A.!G9A.	 $ r?   c                   U R                   b  U R                  SLn/ n/ n/ n/ nU R                   R                  5        Hw  u  pg[        US   5      nXS   La  SnUR	                  U5        UR	                  U5        UR	                  US   5        UR	                  [        U5      S:  a  SOUS   5        My     U(       d  U $ [        X#XEU R                  S9n	[        R                  " XR                  S9$ U R                  bC  U R                  u  p[        U
5      nU R                  c  XL a  U $ [        R                  " X45      $ U R                  c  U $ [        R                  " U R                  5      $ )	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   TrY   r   r   )namesformatsoffsetstitlesr   )align)fieldsmetadatar8  drop_metadatar)   rc   dictr   r$   r   isalignedstructsubdtyper   )r   found_metadatar  r  r  r  r   fieldfield_dt	structurer  r~   new_subdtypes                r2   r  r    sJ   * ||t3 <<--/KD$U1X.HQx'!%LLNN8$NN58$MM#e*q.$eAh? 0 L'^^%	
 xx	)>)>??		#..$X.>>!l&>Lxx-.. >>!Lxx		""r?   rD   )r6   )NL   Nr6   )NTFN)0r8   r&   rd   r   rerP   r\   r(   _utilsr   numpy.core.numerictypesr   r   r   r=   r   r	   r
   r6   r$   rT  r   r   rA   ra   r   r   r   r   r   r   r   r   r   r   r   r   rR  compileIr;  r   r7  r\  r   r  r  r  rq   r?   r2   <module>r     s'   	 
   	     H H . . 2j:A AH2+j#>1r\N& 		(3/l Gc3 c3L G** -= -=f  $=rttD  G?Dy$ y$vIV3$l(T8<#r?   