python中的numpy

开始学习用python实现机器学习的算法,用到了numpy库,好多函数不清楚。

google上找到numpy的官网,可以链接到numpy的reference:http://docs.scipy.org/doc/numpy/reference/

这里仅记录学习过程中用到的:

 

【转】配置python命令tab键自动补全

 

1. 下载readline模块

http://newcenturycomputers.net/projects/readline.html

2. install readlinemodule

3. edit and configure pythonstartup file%USERPROFILE%中,这是个系统变量,路径是c:\user\用户名\

复制代码
# python startup file
import sys
import readline
import rlcompleter
import atexit
import os
# tab completion
readline.parse_and_bind('tab: complete')
# history file
histfile = os.path.join(os.environ['HOME'], '.pythonhistory')
try:
readline.read_history_file(histfile)
except IOError:
pass
atexit.register(readline.write_history_file, histfile)


del os, histfile, readline, rlcompleter
复制代码

4. add the enviroment varable to system with administrator role

For windowns

pythonstartupf=path/pythonstartup.py

将.startup.py放到%USERPROFILE%
添加环境变量PYTHONSTARTUP,
值为%USERPROFILE%\.startup.py

For Linux

add the following to you ~/.bash_profile
export PYTHONSTARTUP=~/.pythonstartup
posted @ 2014-10-30 15:53  celia01  阅读(663)  评论(0编辑  收藏  举报