
    G j0&                     |    S SK r S SKrS SKrS SKJr  0 r\R                  " S\R                  5      rS r	S r
SS jrg)    N)ufuncz[a-z0-9_]+\(.*[,=].*\)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)Nr   )inspect
getmembers	Exceptiondirhasattrgetattr)itemr   membersxs       p/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/skimage/_vendored/numpy_lookfor.py_getmembersr      sk    Q$$T* N  Q25d)P)Qwt?O(Awt'()PPNQs     A%AAA%$A%c                 z	   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aA  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as  Sn UR$                  nU(       Ga  [)        US	5      (       Ga  UR*                   GH  n[,        R.                  R1                  U5      (       d$  [,        R.                  R3                  U5      (       d  MN  [,        R4                  " U5       GH  n[,        R.                  R7                  X5      n[,        R.                  R7                  XS
5      n[,        R.                  R1                  U5      (       a  UR9                  S5      (       a  USS nO)[,        R.                  R1                  U5      (       a  UnOM  US:X  a  M   [        R:                  n[        R<                  n U" 5       [        l        U" 5       [        l        [        U
 SU 35        U[        l        U[        l        GM     GM     [C        U5       H  u  nn [E        USU
 SU 35      n[E        USS5      nSU;  a  U(       a  U SU 3nURI                  U
S-   5      (       d  [        U[J        5      (       a  O#Mk  UR#                  U5      (       d  Ub  UU;   d  M  U	RM                  U
 SU 3U45        M     OYURO                  U5      (       a0  Sn[C        U5       H  u  nnU	RM                  U
 SU 3U45        M      O[)        US5      (       a  Sn URQ                  U5      nUb  UX4XZ'   U	(       a  GMA  U$ ! [         a    0 s $ f = f! [&         a    Sn GNf = f! U[        l        U[        l        f = f! [>         a    e [@         a     GM  f = f! [F         a    U
 SU 3nSn GNuf = f! [F         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)StringIOskimageT   objectmodule__path__z__init__.pyz.py__init__.__name__
__module__class__call__func))r   ior   
isinstancestr
__import__ImportErrorsysmoduleslisttupleupdate_lookfor_generate_cacheid_lookfor_cachesr   popismodule__all__AttributeErrorr	   r   ospathisfileexistslistdirjoinendswithstdoutstderrKeyboardInterruptBaseExceptionr   r
   	NameError
startswithr   appendisclassgetdoc)r   import_modules
regenerater   r   cachemodseenindexstacknamer   kind_allpthmod_paththis_pyinit_py	to_import
old_stdout
old_stderrnv	item_namemod_namedocs                             r   r)   r)   "   s5   * ~&#	v V$	FD	!	!Z%>%>CLL0jQR 	&z_$Zr&z** E"'OBvJDEoov&'E
YYq\
d8tRX
D!!D||
 '$
";";==Cww~~c**"''..2E2E $&JJsO"$'',,s"="$'',,sm"L77>>'22x7H7H7O7O(0"IWW^^G44(0I$$
2$%),J),J8-5Z
-5Z
 *dV1YK+@ A-7
-7
+ %4 )B $D)1$ '"&!!I
  'q,=H i'H#+*Ai[ 9I ++D3J77!!U++ !**1--dasmQ/05 *6 __T""D#D)1asmQ/0 *T:&&D	..&C ?,EKw %z L_  	I	> " 8 .8
-7
0 "!, % %% ! $ $(&!I#H	$8  	C	sq   P5 Q  Q510Q!Q5RR+ 5QQQQQ22Q55RRR('R(+R:9R: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       S3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)  oR                  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N ).0wrU   s     r   	<genexpr>lookfor.<locals>.<genexpr>   s     'ACxs   i  )r   r   r   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   
            r^   r   
   d   i)	r5   lowerstripsplitsumlengetcountmax)	rG   docstrrH   rE   r	first_docr[   kind_relevancewhatss	          r   	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 $ rX   rY   )arB   rt   s    r   relevance_value lookfor.<locals>.relevance_value
  s    &U1X&&    )keyzSearch results for ' '-r`   r    z
    zNothing found.re   )pydocr)   r!   rg   ri   itemsallr=   sortr5   rk   rh   _function_signature_research
IndexErrorwritegetpagerprint)whatr   r@   rA   outputr   foundrG   	docstringrH   rE   rx   s	help_textixlinedoclinesrq   pagerrB   rU   rr   rt   rs   s                      @@@@@r   lookforr      s   Z  $FJGE EIOO##%E*/++-&&y''oo''''LL +8 #TUeTN ' 
JJ?J# sxx/q1AC#a&L!IdddT-0YY[->->t-DU-DT

LDJJL-DU	 ))+I%,,Y77$QK--/	 	D6	{34  )* TYYy)*	Y"	 dii	"#dii	"#+ V  	I	s   &IIA III)NTFN)r$   r0   renumpyr   r+   compileIr   r   r)   r   rY   rz   r   <module>r      sD     	 	  
 $=rttD Nbw$rz   