� B�g������ddlZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z m Z m Z ddlmZmZmZddlZgd�Zd�Zd�ZGd �d ��Zd �Zd �Zd �Zd�Zd!d�Zd�Zdadad"d�Z d!d�Z!e d��d#d���Z"e d��ej#fd���Z$iZ%ej&dej'��Z(e d�� d$d���Z)d�Z*d�Z+d�Z,d�Z-d�Z.d �Z/dS)%�N�)� set_module)� issubclass_� issubsctype� issubdtype)�ndarray�ufunc�asarray) rrr� deprecate�deprecate_with_doc� get_include�info�source�who�lookfor� byte_bounds� safe_eval� show_runtimec���ddlm}m}m}ddlm}t jtjtj ��d�g}gg}}|D]5}||r|� |��� |� |���6|� d|||d�i�� ddl m }|�|����n#t$rt!d��YnwxYw||��d S) 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_infoz�WARNING: `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_umathrrrr�np� __version__�sys�version�platformr�append� threadpoolctlr"�extend� ImportError�print) rrrr� config_found�features_found�features_not_found�featurer"s �_/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/numpy/lib/utils.pyrrs���(�������������������+���!�!� � � �L� *,�R�&�N�#�/�/�� �G� $� /� � !� !�'� *� *� *� *� � %� %�g� .� .� .� .�����(�#�+� � �����6�1�1�1�1�1�1����O�O�-�-�.�.�.�.�� �6�6�6� �5� 6� 6� 6� 6� 6�6����  �F�<�����s�#B9�9C�Cc�4�ddl}|j�Dtj�tj�|j��dd��}nHddlm}tj�tj�|j��d��}|S)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()]) ... rN�core�include) �numpy� show_config�os�path�join�dirname�__file__� numpy.corer4)r6�dr4s r2r r Ks}��$�L�L�L� �� � �G�L�L�������8�8�&�)� L� L��� "�!�!�!�!�!� �G�L�L�������7�7�� C� C�� �H�c� �eZdZdZdd�Zd�ZdS)� _Deprecatez� Decorator class to deprecate old functions. Refer to `deprecate` for details. See Also -------- deprecate Nc�0�||_||_||_dS�N)�old_name�new_name�message)�selfrDrErFs r2�__init__z_Deprecate.__init__ts�� �� � �� ��� � � r?c���� �|j}|j}|j}|��j}|�d|z� n d|�d|�d�� |�� d|zz � t j���� �fd���}||_�j}|�� }n�|����d��} t| dd���} | d � ��r | d z|z}nYt| d ��dz} | dd�D],} t| ��| krn| t| ��dzz } �-|| d�}tj � d | z��� d �� |g��}||_|S) z: Decorator call. Refer to ``decorate``. Nz`%s` is deprecated!�`z` is deprecated, use `z ` instead!� c�L��tj�td����|i|��S)Nr)� stacklevel)�warnings�warn�DeprecationWarning)�args�kwds�depdoc�funcs ��r2�newfuncz$_Deprecate.__call__.<locals>.newfunc�s0��� �M�&�"4�� C� C� C� C��4��&��&�&� &r?�r� z )rDrErF�__name__� functools�wraps�__doc__� expandtabs�split� _get_indent�lstrip�len�textwrap�indentr:)rGrTrQ�kwargsrDrErFrU�doc�linesrb�skip�linerSs ` @r2�__call__z_Deprecate.__call__ys����� �=���=���,�� � ��}�H� � �*�X�5�F�F� ��h�h����*�F� � � �d�W�n� $�F� ��� � � '� '� '� '� '� � � '�$����l�� �;��C�C��N�N�$�$�*�*�4�0�0�E� ��q�r�r��+�+�F��Q�x��� � � !��s�l�S�(����5��8�}�}�q�(��!�!�"�"�I�*�*�D��4�y�y�6�)�)����C��I�I��M�)�D�D��$�%�%�j���_�V�S�6�\�:�:�F��+�+�v�s�m�,�,�C�����r?)NNN)rX� __module__� __qualname__r[rHrh�r?r2rArAhsA������ � ����� 0�0�0�0�0r?rAc���tj}|D]E}t|�����}|r t |t|��|z ��}�F|tjkrd}|S)zU Determines the leading whitespace that could be removed from all the lines. r)r&�maxsizer`r_�min)rerbrg�contents r2r^r^�si���[�F��6�6���d�k�k�m�m�$�$�� � 6����T���W�!4�5�5�F�� ������� �Mr?c�l�|r'|d}|dd�}t|i|��|��St|i|��S)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 rrVN�rA)rQrc�fns r2r r �sS��X �+� �!�W���A�B�B�x��*�z�4�*�6�*�*�2�.�.�.��4�*�6�*�*�*r?c�"�t|���S)a� 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 )rFrq)�msgs r2r r �s��0 �c� "� "� "�"r?c��|j}|dd}|d}|d}t|��jj}|x}}|�||j|zz }n8t ||��D]"\}} | dkr ||dz | zz }�||dz | zz }�#||z }||fS)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�shapeNrV)�__array_interface__r �dtype�itemsize�size�zip) �a�ai�a_data�astrides�ashape�bytes_a�a_low�a_highrx�strides r2rrs���@ � �B� ��Z��]�F��)�}�H� ��[�F��a�j�j��'�G���E�F����!�&�7�"�"��� ���2�2� +� +�M�E�6���z�z��%��'�6�)�)����5��7�F�*�*����'��� �&�=�r?c���|�tj��j}|j}g}i}|���D]�}t ||t ��r�||}t|��}||���vr|d||zz}d}n |||<|}d}d�tt|j ����} t|j ��} |� || | |jj|g����d} d} d} d}|D]�}| t!|d��krt!|d��} | t!|d��krt!|d��} | t!|d��krt!|d��} |dr|t#|d��z }��t!|��dkrpt%d| ��}t%d| ��}t%d| ��}d |d z�d |d z�d |d z�d �}t'|dzdt!|��dzzzdz��|D]�}t'|d�d d |t!|d��z dzz�d |d�d d |t!|d��z dzz�d |d�d d |t!|d��z dzz�d |d�� ����t'd|z��dS)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)rrVz x r�� zName rWz Shape z Bytes z TyperK�=��z' Upper bound on total bytes = %d)r&� _getframe�f_back� f_globals�keys� isinstancer�idr:�map�strrx�nbytesr)rz�namer`�int�maxr-)�vardict�frame�sta�cacher��var�idv�namestr�original�shapestr�bytestr�maxname�maxshape�maxbyte� totalbytes�val�sp1�sp2�sp3�prvals r2rrGs ��X��� ���&���/�� �C� �E�� � ���#�#�� �g�d�m�W� -� -� #��$�-�C��S�'�'�C��e�j�j�l�l�"�"���5��:�!5�5�����!��c� ������z�z�#�c�3�9�"5�"5�6�6�H��#�*�o�o�G� �J�J���7�C�I�N� �"� #� #� #���G��H��G��J��&�&�� �S��Q��[�[� � ��#�a�&�k�k�G� �c�#�a�&�k�k� !� !��3�q�6�{�{�H� �S��Q��[�[� � ��#�a�&�k�k�G� �q�6� &� �#�c�!�f�+�+� %�J�� �3�x�x�!�|�|��"�g�����"�h�����"�g�����47��G�G�G�S��W�W�W�c�#�g�g�g�N�� �e�d�l�S�#�e�*�*�Q�,�/�/�$�6�7�7�7��1�1�� ��A�����S��S��V���_�Q�5F�0G�0G�0G�(+�A�����S��S��V���_�Q�5F�0G�0G�0G�(+�A�����S��S��V���_�Q�5F�0G�0G�0G�(+�A���0� 1� 1� 1� 1� � 4�z� A�B�B�B� �Fr?c�(�t|��}|}|}d}|�|��}|D]d}||krd} n|} |t|��zt| ��z}||kr'|dzt|��z}|dzd|dzzz|z}�\|| z|z}�e|S)Nz, �rVz, rWr)r`r]) r�� arguments�width� firstwidth�k�newstr�sepstr�arglist�argument�addstrs r2� _split_liner��s����T���J��A� �F� �F��o�o�f�%�%�G�� 0� 0�� � �?�?��F�F��F� ��H� � � ��F� � � +�� �u�9�9��Q���X���.�A��e�^�c�:�a�<�&8�8�8�C�F�F��f�_�x�/�F�F� �Mr?r6c���t|t��t��g��}|j|ji}|jg}|jg} t |��dkrn�|�d��}|���D]o}t||tj ��rM||j}||vr<||j}|� |��|� |��|||<�p��||fS)NTr) � __import__�globals�localsrX�__dict__r`�popr�r��types� ModuleTyper))�module�thedict�dictlist� totraverse�thisdict�x�modname�moddicts r2� _makenamedictr��s��� ��� � �6�8�8�R� 8� 8�F���v��/�G��� �H��/�"�J� /� �z�?�?�a� � � ��>�>�!�$�$������� /� /�A��(�1�+�u�'7�8�8� /�"�1�+�.���(�*�*�&�q�k�2�G��O�O�G�,�,�,��%�%�g�.�.�.�'.�G�G�$�� /� �H� �r?c� �d}d}d�}t|dt|����}t|d|��}|j}|jj}|� t j}td||���td|j|���td ||���td |j |���td ||j j ��|���td ||j j ��|���td |j j |���tdt|jjj���|��|���tdd|���|dvr$t|�t j�|��|���d} nS|dkr't|�d|��|���t jdk} n&t|�d|��|���t jdk} td|| ��|���td|jz|���dS)aOProvide 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��|SrCrk)r�s r2�<lambda>z_info.<locals>.<lambda>�s��1�r?� __class__rXNzclass: ��filezshape: z strides: z itemsize: z aligned: z contiguous: z fortran: zdata pointer: z byteorder: rW)�endr�)�|r�F�>�big�littlez byteswap: ztype: %s)�getattr�typerwrz� byteorderr&�stdoutr-rxr{�flags�aligned� contiguous�fortran�hex�ctypes�_as_parameter_�value) �obj�output�extra�tic�bp�cls�nmrw�endian�byteswaps r2�_infor��s4��$ �E� �C� ��B� �#�{�D��I�I� .� .�C� ��j�#� &� &�B��k�G� �Y� �F� �~���� �)�R�f�%�%�%�%� �)�S�Y�V�,�,�,�,� �+�w�V�,�,�,�,� �,�� �6�2�2�2�2� �+�r�r�#�)�+�,�,�6�:�:�:�:� �.�"�"�S�Y�1�2�2��@�@�@�@� �+�s�y�(�v�6�6�6�6� �E� #�C�J�$=�$C� D� D� D�e�e�L� � � � � � �-�S�v�.�.�.�.� ���� �#�#�s�}�}�c�c�2��@�@�@�@���� �3��� �3�3�3���$�6�2�2�2�2��=�E�)��� �c�c�c�3�3�'�f�5�5�5�5��=�H�,�� �,���8� � �6�2�2�2�2� �*�s�y� �v�.�.�.�.�.�.r?�Lc��ddl}ddl}t|d��st|d��r|j}nt|d��r|j}|� t j}|�tt��dSt|t��rt||���dSt|t���rt�t|��\a ad}g}tD]�} t||} t| ��|vrt!d|z|���nY|�t| ����t!d |z|���t| ��t!d |z|���|d z }��#t$$rY��wxYw|dkrt!d |z|���dSt!d |z|���dS|�|��s|�|��r�|j} t|�|����} n#t.$rd} YnwxYwt1| | z��|krt3| | |��} n| | z} t!d| zdz|���t!|�|��|���dS|�|���r�|j} t|�|����} n#t.$rd} YnwxYwt1| | z��|krt3| | |��} n| | z} t!d| zdz|���|�|��} | �:t|d��r)t!|�|j��|���n$t!|�|��|���|�|��}d�|D��}|rmt!d|���|D][}t=||d��}|�-|�|�|��pd��\}}t!d|�d|��|����ZdSdSt|d��r&t!|�|��|���dSdS)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 rN�_ppimport_importer�_ppimport_module�_ppimport_attr)r�z+ *** Repeat reference found in %s *** r�z *** Found in %s ***�-rVzHelp for %s not found.z+ *** Total of %d references found. ***z()rWrKrHc�*�g|]}|ddk�|��S)r�_rk)�.0�meths r2� <listcomp>zinfo.<locals>.<listcomp>�s!��E�E�E�4�d�1�g��n�n�$�n�n�nr?z Methods: �Nonez z -- r[) �pydoc�inspect�hasattrr�r�r&r�rr�rr�r�� _namedictr�� _dictlistr�r-r)�KeyError� isfunction�ismethodrX� signature� Exceptionr`r��getdoc�isclassrH� allmethodsr��splitdoc)�object�maxwidthr��toplevelr�r��numfound�objlistr�r�r�r��argstr�doc1�methods�public_methodsr��thisobj�methstr�others r2rrsC��L�L�L�L��N�N�N���,�-�-�'� �6�-� .� .�'��(��� ��)� *� *�'��&�� �~���� �~� �T� � � � � � �F�G� $� $�P3� �f�V�$�$�$�$�$�$� �F�C� � �N3� � �#0��#:�#:� �I�y����� � � �G� ���(��0���c�7�7�g�%�%��B�DK�L�%������ �N�N�2�c�7�7�+�+�+��4�w�>�V�L�L�L�L���I�I�I��#�h�,�V�4�4�4�4��A� ����� � � ��� ���� �q�=�=� �*�V�3�&� A� A� A� A� A� A� �:�<D�E�� � � � � � � � � �F� #� #�13�w�'7�'7��'?�'?�13���� ��G�-�-�f�5�5�6�6�I�I��� � � ��I�I�I� ���� �t�I�~� � �� )� )� ��y�(�;�;�F�F��I�%�F� �c�F�l�T�!��/�/�/�/� �g�n�n�V�$�$�6�2�2�2�2�2�2� ���� � �"3���� ��G�-�-�f�5�5�6�6�I�I��� � � ��I�I�I� ���� �t�I�~� � �� )� )� ��y�(�;�;�F�F��I�%�F� �c�F�l�T�!��/�/�/�/��~�~�f�%�%�� �<��v�z�*�*� D��g�n�n�V�_�5�5�F�C�C�C�C�� �'�.�.��(�(�v� 6� 6� 6� 6��"�"�6�*�*��E�E�7�E�E�E�� � E� �"�� 0� 0� 0� 0�&� E� E��!�&�$��5�5���&�%*�^�^�#�N�N�7�3�3�=�v�&�&�N�G�U������g�g�6�V�D�D�D�D�D� E� E� E� E� ��� #� #�3� �g�n�n�V�$�$�6�2�2�2�2�2�2�3�3s7�BE+�+ E8�7E8�"H� H�H�"J?�? K� Kc���ddl} td|�|��z|���t|�|��|���dS#t$rtd|���YdSwxYw)a� 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. rNz In file: %s r�zNot available for this object.)r�r-� getsourcefile� getsourcer�)rr�r�s r2rr�s���R�N�N�N�=� �o�� 5� 5�f� =� =�=�F�K�K�K�K� �g����'�'�f�5�5�5�5�5�5�� �=�=�=� �.�V�<�<�<�<�<�<�<�=���s�A A�A2�1A2z[a-z0-9_]+\(.*[,=].*\)TFc� ������ddl}t|||���g}t|����������sdS����D]R\}\}} } | dvr�|����t �fd��D����r|�|���Sddddd����fd����fd �} |�| � ��d d � ���z} | d t| ��zg} |ddd�D]�}�|\�} }d��� ���d��D��} |d� ��}t� |��r|d� ��}n#t$rd}YnwxYw| �|�d|������|s| �d��|�*|�d� | ����dSt| ��dkr4|���}|d� | ����dSt#d� | ����dS)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. ... rN)r�rc3� �K�|]}|�vV�� dSrCrk)r��wrds �r2� <genexpr>zlookfor.<locals>.<genexpr>2s'�����'�'�A�q�C�x�'�'�'�'�'�'r?i�����)rT�classr�rc������d}d�|�������d��dd����|t �fd��D����z }|t �fd��D����z }|t ��� dzz }|��|d��z }|��d�� d zz }|t| d z d ��z }|S) NrrKr�c���g|]}|�v�d�� S)��rk)r�r� first_docs �r2r�z.lookfor.<locals>.relevance.<locals>.<listcomp>@s���7�7�7�!��Y���#���r?c���g|]}|�v�d�� S)�rk)r�rr�s �r2r�z.lookfor.<locals>.relevance.<locals>.<listcomp>Bs���1�1�1��q�D�y�y�"�y�y�yr?r�r�.r��di����) r:�lower�stripr]�sumr`�get�countr�)r��docstr�kind�index�rr�kind_relevance�whatss` @��r2� relevancezlookfor.<locals>.relevance<s������ ���I�I�f�l�l�n�n�2�2�4�4�:�:�4�@�@��!��D�E�E� � �S�7�7�7�7�u�7�7�7� 8� 8�8�� �S�1�1�1�1�e�1�1�1� 2� 2�2�� �c�$�i�i�Z�!�^��� �^� � ��e� ,� ,�,�� �d�j�j��o�o� �� "�"�� �S�%��#��t� $� $�$���r?c�"���|g�|�R�SrCrk)r~r�r,s ��r2�relevance_valuez lookfor.<locals>.relevance_valueLs����y��&�U�1�X�&�&�&�&r?)�keyzSearch results for '%s'rWr������c�^�g|]*}|����|�����+Srk)r")r�rgs r2r�zlookfor.<locals>.<listcomp>Vs<��%�%�%�T��z�z�|�|�%�D�J�J�L�L�%�%�%r?rKrVr�z zNothing found.r�)r��_lookfor_generate_cacher�r!r]�items�allr)�sortr:r`r"�_function_signature_re�search� IndexError�write�getpagerr-)�whatr��import_modules� regenerater�r�r r�� docstringr'r(r.�s� help_text�ix�doclinesr�pagerr�rdr*r,r+s @@@@@r2rr�s��������^�L�L�L� $�F�N�J� G� G�E� �E� ��I�I�O�O� � � #� #� %� %�E� ����*/�+�+�-�-���&��&�y�$�� �'� '� '� ��o�o���� �'�'�'�'��'�'�'� '� '� � �L�L�� � � �� #�T� %��8�8�N������� '�'�'�'�'�'� �J�J�?�J�#�#�#� "�S�X�X�e�_�_�5�A��C��A���J��I��d�d��d� � ;� ;���d� � ��T�2�%�%�S�Y�Y�[�[�->�->�t�-D�-D�%�%�%�� � �� �)�)�+�+�I�%�,�,�Y�7�7� 0�$�Q�K�-�-�/�/� ���� � � ��I�I�I� ����������y�y�9�:�:�:�:� �+����)�*�*�*���� � �T�Y�Y�y�)�)�*�*�*�*�*� �Y���"� � ���� � �� ��d�i�i� �"�"�#�#�#�#�#� �d�i�i� �"�"�#�#�#�#�#s�AF*�* F9�8F9c���ddl}ddlm}|�d}t|t��r6 t |��n#t $ricYSwxYwtj|}nWt|t��st|t��r-i}|D]&}|� t|||�����'|St|��tvr|stt|��Si}|tt|��<i}d}|j|fg} | �r]| �d��\} } t| ��|vr�-d|t| ��<|dz }d} |�| ���rsd} | j} n#t&$rd} YnwxYw|�r�t)| d ���rv| jD�]m}t-j|��D�]T}t,j�||��}t,j�||d ��}t,j�|��r |�d ��r |dd �}n#t,j�|��r|}n��|d kr�� tj}tj} |��t_|��t_t | �d|����|t_|t_n#|t_|t_wxYw��;#t<$r�t>$rY��RwxYw��otA| ��D]�\}} tC|d| �d|����}tC|dd��}n#tD$r | �d|��}d}YnwxYwd|vr |r|�d|��}|�#| dz��st|tH��rn��|�|��s| �|| vs��| �%| �d|��|f����n[|�&| ��r4d} tA| ��D]!\}}| �%| �d|��|f���"nt)| d��rd} |�'| ��}n#tD$rd}YnwxYw|�|| |f|| <| ��]|S)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. rN)�StringIOr6TrVrr��__path__z __init__.pyz.py�����rHrrXrirrhrT)(r��iorEr�r�r�r,r&�modules�list�tuple�updater2r��_lookfor_cachesrXr��ismodule�__all__�AttributeErrorr�rFr8�listdirr9r:�isfile�endswithr��stderr�KeyboardInterrupt� BaseException� _getmembersr�� NameError� startswithr r)rr)r�r<r=r�rEr��mod�seenr(�stackr��itemr'�_all�pth�mod_path�this_py�init_py� to_import� old_stdout� old_stderr�n�v� item_name�mod_namerds r2r2r2nsv��*�N�N�N������� �~����&�#��� � � �v� � � � ��� � � ��I�I�I� ������V�$��� �F�D� !� !��Z���%>�%>����� >� >�C� �L�L�0��n�1;�=�=� >� >� >� >�� � �&�z�z�_�$�$�Z�$��r�&�z�z�*�*� �E�"'�O�B�v�J�J�� �D� �E��o�v� &� '�E� �U-��Y�Y�q�\�\� ��d� �d�8�8�t� � � ���R��X�X�� �� ���� � � �D� !� !�D ��D� ��|����!� � � ����� ����� %�'�$� �";�";� %��=�%�%�C�$&�J�s�O�O�%�%��"$�'�,�,�s�H�"=�"=��"$�'�,�,�s�H�m�"L�"L���G�N�N�7�3�3�%� (� 1� 1�%� 8� 8�%�(0��"�� �I�I��W�^�^�G�4�4�%�(0�I�I�$�$� �2�2�$�%�),��J�),��J�8�-5�X�Z�Z�� �-5�X�Z�Z�� � *�d�d�d�I�I�+F� G� G� G�-7�� �-7�� � ��.8�� �-7�� � 7� 7� 7� 7� ��0�"�"�"�!�,�%�%�%�%�H�%����5%�>$�D�)�)� 7� 7���1�$� '��:�$�$�$���7J� K� K�I�&�q�,��=�=�H�H�� �$�$�$�,0�4�4��� 3�I�#�H�H�H� $���� �i�'�'�H�'�+3�8�8�Y�Y� ?�I� �+�+�D�3�J�7�7��!�!�U�+�+�!�� �!�*�*�1�-�-�����d����� � ����q�q�1�1�5�6�6�6�6�+ 7�,�_�_�T� "� "� ��D�#�D�)�)� 7� 7���1�� � ����q�q�1�1�5�6�6�6�6� 7� �T�:� &� &� ��D� ��.�.��&�&�C�C��� � � ��C�C�C� ���� �?���e�,�E�$�K�k �U-�n �Lso�5� A�A�)E1�1 F�?F�#K0�<<K�8K0�K+�+K0�0L�L�"'M � M �M �5Q � Q�Qc���ddl} |����}n+#t$r�fd�t���D��}YnwxYw|S)Nrc�T��g|]$}t�|���|t�|��f��%Srk)r�r�)r�r�r]s �r2r�z_getmembers.<locals>.<listcomp>�sF���(�(�(�Q��d�A�&�&�(�A�w�t�Q�'�'�(�(�(�(r?)r�� getmembersr��dir)r]r��memberss` r2rWrW�sy����N�N�N�(��$�$�T�*�*���� �(�(�(�(�(�(�(�#�d�)�)�(�(�(����(���� �Ns��%A�Ac�4�ddl}|�|��S)au 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...> rN)�ast� literal_eval)rrps r2rrs"��d�J�J�J� � � �F� #� #�#r?c�p�|jdkr|S|�d|���}tj|��}tj�|��r|�d��}|���s|St|tj ��r|Stj |||���|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. rr0)�axisF)�where) r|�taker$�isnan�ma� isMaskedArray�filled�anyr��generic�copyto)rv�resultrs�potential_nansrfs r2�_median_nancheckr9s���* �y�A�~�~�� ��Y�Y�r��Y�-�-�N� ��� � �A� �u���1���� �H�H�U�O�O�� �5�5�7�7��� ��&�"�*�%�%�����I�f�n�A�.�.�.�.� �Mr?c���ddlm}m}m}t |��dkrt |��dkrdSd�|��}|D]}||r |d|�d�z }�|d|�d�z }�|S)a� 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. rrr�rW�*�?)r#rrrr`r:)rrr�enabled_featuresr1s r2� _opt_infor�cs������������� � ����!�!�c�*:�&;�&;�q�&@�&@��r��x�x� 0�1�1��#�/�/�� �G� $� /� ��G���� .� � � ��G���� .� � � �r?c���|j��|jdu}g}g}g}g}|j���D]�\}}t|d��}||durd}|�|��|�|��|�|d��|�t |��dkrdn|d����|s|St |||||j���} tj | |j ���S|j �<|j \} } t| ��} |j�| | ur|Stj | | f��S|j�|Stj |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")``. NrTrVr�r)�names�formats�offsets�titlesr{)�align) �fields�metadatar3� drop_metadatar)r`�dictr{r$rz�isalignedstruct�subdtyper�) rz�found_metadatar�r�r�r�r��field�field_dt� structurer�rx� new_subdtypes r2r�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����'�&��^�%�%�%� � �x� ��)>�?�?�?�?� �� #��.���%�$�X�.�.� � �>� !�l�h�&>�&>��L��x��u�-�.�.�.� �>� !��L��x�� �"�"�"r?rC)r6)Nr�Nr6)NTFN)0r8r&rar��rerNrYr(�_utilsr�numpy.core.numerictypesrrrr=rr r r6r$rOrr rAr^r r rrr�r�r�r�r�rr�rrM�compile�Ir6rr2rWrrr�r�rkr?r2�<module>r�s��� � � � � � � � ����� � � � � � � � �������������������H�H�H�H�H�H�H�H�H�H�.�.�.�.�.�.�.�.�.�.����� � � ��2�2�2�j � � �:A�A�A�A�A�A�A�A�H � � �2+�2+�2+�j#�#�#�>1�1�1�r\ �\ �\ �\ �N���& � � � �����(3/�3/�3/�3/�l ��G���c3�c3�c3���c3�L ��G����*�-=�-=�-=���-=�f��$���$=�r�t�D�D�� ��G���?D��y$�y$�y$���y$�vI�I�I�V���3$�3$�3$�l(�(�(�T���8<#�<#�<#�<#�<#r?
Memory