安装依赖库: sudo zypper install cmake git libgtk2.0-devel pkg-config libavcodec-devel libavformat-devel libswscale-devel python-devel python-numpy python-n ...
分类:
其他好文 时间:
2016-12-12 11:42:43
阅读次数:
136
在Linux上各种尝试各种失败,因为没有Linux权限,没法通过yum、apt等工具自动更新系统的底层环境(主要是glibc),而自己手动安装往往十分繁琐。 Windows上安装就比较简单了,但是一定要注意:目前只支持python3.5的64bit版本,有了python后,pip安装numpy后,就... ...
分类:
其他好文 时间:
2016-12-07 01:25:55
阅读次数:
1516
安装homebrew lapomme@lapommedeMacBook-Pro:~|? sudo pip3 install matplotlib The directory '/Users/lapomme/Library/Caches/pip/http' or its parent director ...
分类:
系统相关 时间:
2016-12-06 03:11:00
阅读次数:
662
(一)读写文件 (1)创建单位矩阵(主对角线元素均为1,其余元素均为0) i5 = eye(5) 注:eye()函数 numpy.eye(N,M=None, k=0, dtype=<type 'float'>) 关注第一个第三个参数就行了 第一个参数:输出方阵(行数=列数)的规模,即行数或列数 第三 ...
分类:
其他好文 时间:
2016-12-04 06:50:48
阅读次数:
272
第一种用法 np.where(conditions,x,y) if (condituons成立): 数组变x else: 数组变y import numpy as np ''' x = np.random.randn(4,4) print(np.where(x>0,2,-2)) #试试效果 xarr ...
分类:
编程语言 时间:
2016-12-03 20:53:06
阅读次数:
643
何凯明博士的去雾文章和算法实现已经漫天飞了,我今天也就不啰里啰唆,直接给出自己python实现的完整版本,全部才60多行代码,简单易懂,并有简要注释,去雾效果也很不错。 在这个python版本中,计算量最大的就是最小值滤波,纯python写的,慢,可以进一步使用C优化,其他部分都是使用numpy和o ...
分类:
编程语言 时间:
2016-12-03 11:47:09
阅读次数:
892
1.The way to calculate the slope: the covariance of x and y divided by the variance of x from numpy import cov slope_density = cov(wine_quality["quali ...
分类:
其他好文 时间:
2016-12-02 07:58:34
阅读次数:
167
pandas 是基于 Numpy 构建的含有更高级数据结构和工具的数据分析包 类似于 Numpy 的核心是 ndarray,pandas 也是围绕着 Series 和 DataFrame 两个核心数据结构展开的 。Series 和 DataFrame 分别对应于一维的序列和二维的表结构。pandas ...
分类:
其他好文 时间:
2016-12-02 02:14:16
阅读次数:
270
当在你的某个文件夹中打开xxx.py的时候(引用numpy的py文件) 、 ...
分类:
其他好文 时间:
2016-12-02 01:00:21
阅读次数:
1139