yyyyyyyyyyyyyyyyyyyy

博客园 首页 新随笔 联系 订阅 管理

2015年8月28日 #

摘要: random模块用于生成随机数,下面看看模块中一些常用函数的用法: numpy.random.rand(d0, d1, ..., dn):生成一个[0,1)之间的随机浮点数或N维浮点数组。#numpy.random.rand(d0, d1, ..., dn)import numpy as np#无参 阅读全文
posted @ 2015-08-28 03:59 xxxxxxxx1x2xxxxxxx 阅读(239) 评论(0) 推荐(0)

摘要: reduce函数:在Python 3里,reduce()函数已经被从全局名字空间里移除了,它现在被放置在fucntools模块里 用的话要 先引入:>>> from functools import reduce >>> print(l1)[0, 1, 2, 3, 4, 5, 6]>>> reduc 阅读全文
posted @ 2015-08-28 03:59 xxxxxxxx1x2xxxxxxx 阅读(299) 评论(0) 推荐(0)

摘要: Python在数据科学中的地位,不仅仅是因为numpy, scipy, pandas, scikit-learn这些高效易用、接口统一的科学计算包,其强大的数据可视化工具也是重要组成部分。在Python中,使用的最多的数据可视化工具是matplotlib,除此之外还有很多其他可选的可视化工具包,主要 阅读全文
posted @ 2015-08-28 03:57 xxxxxxxx1x2xxxxxxx 阅读(1081) 评论(0) 推荐(0)

摘要: #!/usr/bin/env python #coding:utf-8import urllib2,re,sys,os,types #from bs4 import BeautifulSoup ... 阅读全文
posted @ 2015-08-28 02:59 xxxxxxxx1x2xxxxxxx 阅读(471) 评论(0) 推荐(0)