bg!BdZddlZddlmZddlmZddlmZddl m Z ddlm Z ddlm Z dd lmZdd lmZdd lmZmZejjZejjZejjZejjZejjZej jZ!e j"e j#e j"e j$e j"e j%e j"e j&iZ'e j"e j(e j"e j&kr=e')e j"e j*e j"e j(iddd ed fdZ+ddd ed fdZ,dddd ed fdZ-dddd ed fdZ.dd ddZ/dd ddZ0ddZ1d dZ2dd ddZ3d!d ddZ4d!d ddZ5d"dZ6d#dZ7d#dZ8dS)$zx Array methods which are called by both the C-code for the method and the Python code for the NumPy-namespace function N) nullcontext) multiarray)umath) asanyarray) numerictypes) _exceptions)_no_nep50_warning)_NoValue)pickle os_fspathFTc ,t||d||||SN) umr_maximumaaxisoutkeepdimsinitialwheres J/opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/core/_methods.py_amaxr' q$c8We D DDc ,t||d||||Sr) umr_minimumrs r_aminr+rrc ,t|||||||Sr)umr_sumrrdtyperrrrs r_sumr"/s 1dE3'5 A AArc ,t|||||||Sr)umr_prodr s r_prodr%3s AtUC7E B BBrrcZ|durt|||||St||||||SNTr&)umr_anyrrr!rrrs r_anyr+7< }}q$sH555 1dE3 > > >>rcZ|durt|||||St||||||Sr()umr_allr*s r_allr/=r,rcr|dur|"tt|j}nt|ts|f}d}|D]*}||jt j||jz}+tj|}n2ddl m }t|||j|tjd|}|S)NTr) broadcast_to) tuplerangendim isinstanceshapemunormalize_axis_indexntintpnumpy.lib.stride_tricksr2r)arrrrritemsaxr2s r_count_reduce_itemsr@Cs }} <sx))DDD%(( 7D F FB SYr6r38DDE EEE 988888 UCI66bgt "" Lrc ||td|tj||fd|i|S|tj||fd|i|Stj|||fd|i|S)NzOne of max or min must be givenr) ValueErrorumminimummaximumclip)rminmaxrkwargss r_cliprJZs {s{:;;; {z!S44c4V444 z!S44c4V444wq#s666v666rct|}d}t||||}|dur|dkr2nt|dkdrtjdt d|t |jjtj tj frtjd }n:t |jjtj rtjd }d}t|||||| } t| tjr^t#5t%j| || d d } dddn #1swxYwY|r||j| } nSt)| dr>|r|j| |z } n#| j| |z } n| |z } | S)NFrrTrrzMean of empty slice. stacklevelf8f4r&unsafercastingsubokr!)rr@r)warningswarnRuntimeWarning issubclassr!typer:integerbool_r8float16rr6ndarrayr rC true_dividehasattr) rrr!rrrr=is_float16_resultrcountrets r_meanrees  Q--C dXU K K KFtmmv{{{14)H)H)H{ ,nKKKK } cinrz28&< = = %HTNNEE   3 3 %HTNNE $  #tUC ? ? ?C#rz""    I I.S(%IIIC I I I I I I I I I I I I I I I  &)..%%C g    /)..v..CC)..v..CCFl JsEE  E cZt|}t||||}|dur||kr2nt||kdrtjdt d|Dt |jjtj tj frtjd}t|||d|} |jdkr|} n|| j} t#| tjr@t'5t)j| | | d d } dddn #1swxYwYn3t-| d r| j| |z } n| |z } t|| z } t |jjtjtj frt)j| | | } n| jt2vrm| t2| jdf} t)j| | | t)j| d| d| j j} n.t)j| t)j| | j} t| |||||} t)j||z d}t#| tjr@t'5t)j| || d d } dddn #1swxYwYn3t-| d r| j| |z } n| |z } | S)NrLTrMz!Degrees of freedom <= 0 for slicerNrOrQrrSFrTr!rrN)r!).r).r1)rr@r)rWrXrYrZr!r[r:r\r]r8rr5reshaper7r6r_r rCr`rafloatingmultiply_complex_to_floatviewaddreal conjugaterE)rrr!rddofrrr=rcarrmeandivxxvrds r_varrvs Q--C dXU K K KF$tv~~~GDFN,N,N,N~ 9>!" $ $ $ $ }CINRZ4JKK} c4UCCCG{annW]++'2:&&#   D DnWcw-5UDDDG D D D D D D D D D D D D D D D ' " "#-$$Wv%566F" 3=!!A#).2; ";<< 8 K1! $ $ $ % % % VV,QW5trsf """"""''''''"""""",,,,,,))))))""""""666666######********j j &- ;  -  .  BHRZ828BI.. BHRZ828BI..  28BMhbhry1111  828BM#:#: D5$EEEED5$EEEETteBBBBdu$CCCC?d????? ?d????? . 7 7 7 7 t     DCCCCCCJ      0000111111r