学习过程中出现的Error

2016-07-19  本文已影响0人  iRandy

http://stackoverflow.com/questions/8634700/python-indentationerror-unexpected-indent

python代码中不能使用制表符来缩进,需要使用4个空格,否则会出错

正则表达式re.findall()返回格式为list

list [ ]
dictionary { }
tuple ( )

davis@dlib.net

import
def plot_decision_boundary(pred_func, X, y):
#from https://github.com/dennybritz/nn-from-scratch/blob/master/nn-from-scratch.ipynb
# Set min and max values and give it some padding
x_min, x_max = X[:, 0].min() - .5, X[:, 0].max() + .5
y_min, y_max = X[:, 1].min() - .5, X[:, 1].max() + .5

用x_min, x_max来标记X第0列的最大值和最小值
用y_min, y_max来标记X第1列的最大值和最小值

上一篇 下一篇

猜你喜欢

热点阅读