3

+Y@s6ddlZddZddZddZddd	Zd
dZdS)
Nc
CsDg}x0|D](}yt|}|j|Wq
Yq
Xq
Wtj|}|S)N)floatappendnparray)rarray2colnumZarray3r	2/home/s/sultans/web/python/demo/numpy/Analytics.py	normalizes


rcCsddlm}|j|}|dS)Nr)stats)scipyrmode)rrZmodeArrr	r	r
r!s
rcCsdt|}|dt|j7}|dttj|7}|dttj|7}|dttj|7}|dtt|7}|dttj|7}|dttj|7}|d	ttj	|7}|d
ttj
|7}|S)Nz
Data points: z
Count......: z
Sum........: z
Average....: z
Median.....: z
Mode.......: z
Minimum....: z
Maximum....: z
Range......: z
Std.Dev....: )strsizersumaveragemedianrminmaxptpstd)rdatar	r	r
toString+srcCsXtjg}|dkr||}|dkr:t|}t|}||}|dkrTtj|}|j}|S)Nrowrall)rrziplistflatten)	array2dimtypeidxrobjr	r	r
slice<s

r#cCst|}t|}|S)N)rr)rr"rr	r	r
	transposeQsr$)r)numpyrrrrr#r$r	r	r	r
<module>	s