首页 > 编程语言 > 详细

Python-Matplotlib 2 Numpy

时间:2017-02-16 13:00:36      阅读:120      评论:0      收藏:0      [点我收藏+]

Python-Matplotlib 2 Numpy

技术分享

 

 

import numpy as np
arr = np.random.random(size=10)
print(arr)
print(‘{0} :  {1}‘.format(‘min‘.ljust(10), arr.min()))
print(‘{0} :  {1}‘.format(‘max‘.ljust(10), arr.max()))
#print(‘{0} :  {1}‘.format(‘median‘.ljust(10), np.median(arr)))
print(‘{0} :  {1}‘.format(‘mean‘.ljust(10), arr.mean()))
#print(‘{0} :  {1}‘.format(‘variance‘.ljust(10), arr.variance()))
print(‘{0} :  {1}‘.format(‘sort‘.ljust(10), arr.sort()))

Result

[ 0.78305111  0.76055492  0.44443505  0.9066785   0.30952056  0.52850392
  0.87953433  0.48186146  0.11761803  0.60087449]
min        :  0.11761802735764193
max        :  0.9066785032716341
mean       :  0.5812632368426661
sort       :  None

  

Python-Matplotlib 2 Numpy

原文:http://www.cnblogs.com/zsr0401/p/6404647.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!