python 学习
qianchenzhihai
热爱生活 热爱工作
展开
-
python 时间库 time
在开始之前,首先要说明这几点:1.在Python中,通常有这几种方式来表示时间:1)时间戳 2)格式化的时间字符串 3)元组(struct_time)共九个元素。由于Python的time模块实现主要调用C库,所以各个平台可能有所不同。2.UTC(Coordinated Universal Time,世界协调时)亦即格林威治天文时间,世界标准时间。在中国为UTC+8。DST(Dayligh转载 2017-06-06 15:41:10 · 864 阅读 · 0 评论 -
Python 时间库 datetime
dir(datetime)Out[23]: ['MAXYEAR', 'MINYEAR', '__doc__', '__name__', '__package__', 'date', 'datetime', 'datetime_CAPI', 'time', 'timedelta', 'tzinfo']包含的数据:MAXYEAR -- 能表示的最大年份MINYEAR转载 2017-06-05 14:54:32 · 743 阅读 · 0 评论 -
NumPy学习指南 学习笔记(二) 常用函数
1. 文件读写通常情况下,数据是以文件形式存储的。学会读写文件是深入学习Numpy的基础。1.1 创建单位矩阵,并存入txt文件i2 = np.eye(2)i2Out[84]: array([[ 1., 0.], [ 0., 1.]])使用savetxt 函数将数据存储到文件中,当然需要指定文件名以及要保持的数组。np.savetxt("eye.txt转载 2017-05-12 14:47:33 · 2572 阅读 · 0 评论 -
NumPy doc (七)
np.bincount(x, weights=w) array([ 0.3, 0.7, 1.1]) blackman(M) Return the Blackman window. The Blackman window is a taper formed by using the first three转载 2017-05-11 14:03:41 · 4983 阅读 · 0 评论 -
NumPy doc (六)
uintc = class uint32(unsignedinteger) | Method resolution order: | uint32 | unsignedinteger | integer | number | generic | __builtin__转载 2017-05-11 14:02:05 · 500 阅读 · 0 评论 -
NumPy doc (五)
class ndindex(__builtin__.object) | An N-dimensional iterator object to index arrays. | | Given the shape of an array, an `ndindex` instance iterates over | the N-dimensional转载 2017-05-11 13:59:47 · 1660 阅读 · 0 评论 -
NumPy doc(四)
float_ = class float64(floating, __builtin__.float) | 64-bit floating-point number. Character code 'd'. Python float compatible. | | Method resolution order: | float64转载 2017-05-11 13:58:09 · 960 阅读 · 0 评论 -
NumPy doc (三)
class complex128(complexfloating, __builtin__.complex) | Composed of two 64 bit floats | | Method resolution order: | complex128 | complexfloating | in转载 2017-05-11 13:56:18 · 352 阅读 · 0 评论 -
NumPy doc (二)
class bool_(generic) | Numpy's Boolean type. Character code: ``?``. Alias: bool8 | | Method resolution order: | bool_ | generic | __builtin__.object转载 2017-05-11 13:52:56 · 398 阅读 · 0 评论 -
NumPy doc (一)
help(numpy)Help on package numpy:NAME numpyFILE c:\anaconda2\lib\site-packages\numpy\__init__.pyDESCRIPTION NumPy ===== Provides 1. An array object of arbitrary转载 2017-05-11 13:50:36 · 2372 阅读 · 0 评论 -
Numpy 学习指南 学习笔记(一)
1. 数值的组合Numpy 数组有水平组合、垂直组合和深度组合等多种组合方式,我们将使用vstack、dstack、hstack、column_stack、row_stack以及concatenate函数来完成数组的组合。实践如下: (1) 水平组合 将ndarray对象构成的元组作为参数,传给hstack函数。如下所示: 使用concatenate 函数可以实转载 2017-05-10 10:26:42 · 4486 阅读 · 0 评论