• File: _methods.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/site-packages/numpy/core/__pycache__/_methods.cpython-37.pyc
  • Date Modified: 04/24/2023 7:10 PM
  • File size: 3.55 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

<Fd`@sdZddlmZmZmZddlZddlmZddlm	Z
ddlmZddlm
Ze
jjZe
jjZe
jjZe
jjZe
jjZe
jjZdd	d
ZdddZdd
dZd ddZd!ddZ d"ddZ!ddZ"d#ddZ#d$ddZ$d%ddZ%dS)&zx
Array methods which are called by both the C-code for the method
and the Python code for the NumPy-namespace function

)divisionabsolute_importprint_functionN)
multiarray)umath)
asanyarray)numerictypesFcCst||d||S)N)umr_maximum)aaxisoutkeepdimsrF/opt/alt/python37/lib64/python3.7/site-packages/numpy/core/_methods.py_amaxsrcCst||d||S)N)umr_minimum)r
rrr
rrr_aminsrcCst|||||S)N)umr_sum)r
rdtyperr
rrr_sumsrcCst|||||S)N)umr_prod)r
rrrr
rrr_prod"srcCst|||||S)N)umr_any)r
rrrr
rrr_any%srcCst|||||S)N)umr_all)r
rrrr
rrr_all(srcCsJ|dkrtt|j}t|ts&|f}d}x|D]}||j|9}q0W|S)N)tuplerangendim
isinstanceshape)arrritemsZaxrrr_count_reduce_items+s

r$c	Cst|}d}t||}|dkr.tjdtdd|dkrvt|jjtj	tj
frXtd}nt|jjtjrvtd}d}t
|||||}t|tjrtj|||d	dd
}|r|dkr|j|}n:t|dr|r|j||}q|j||}n||}|S)NFrzMean of empty slice.)
stacklevelf8Zf4Tunsafe)rcastingsubokr)rr$warningswarnRuntimeWarning
issubclassrtypentintegerbool_muZfloat16rr ndarrayumtrue_dividehasattr)	r
rrrr
r"Zis_float16_resultrcountretrrr_mean5s.


r:cCsHt|}t||}||kr*tjdtdd|dkrRt|jjtj	tj
frRtd}t|||dd}t
|tjrtj|||ddd	}n|j||}t||}	t|jjtjrtj|	t|	|	d
j}	ntj|	|	|	d
}	t|	||||}
t||dg}t
|
tjrtj|
||
ddd	}
n&t|
dr<|
j|
|}
n|
|}
|
S)
Nz!Degrees of freedom <= 0 for slicer%)r&r'T)r
r(F)rr)r*)rrr)rr$r+r,r-r.rr/r0r1r2r3rr r4r5r6Zcomplexfloatingmultiply	conjugaterealmaxr7)r
rrrddofr
r"r8Zarrmeanxr9rrr_varVs2

rAcCs\t||||||d}t|tjr0tj||d}n(t|drN|jt|}n
t|}|S)N)rrrr?r
)rr)	rAr r3r4r5Zsqrtr7rr/)r
rrrr?r
r9rrr_stds

rB)NNF)NNF)NNNF)NNNF)NNNF)NNNF)NNNF)NNNrF)NNNrF)&__doc__Z
__future__rrrr+Z
numpy.corerr3rr5Znumpy.core.numericrrr0Zmaximumreducer	Zminimumraddrr;rZ
logical_orrZlogical_andrrrrrrrr$r:rArBrrrr<module>s,







!
/