1、unexpected indent
Python对代码格式是很严格的,indentation是缩进、缩排的意思,unexpected indent 就是说有“意外的”缩进。这时,就要查看自己的代码格式了!
2、invalid syntax
invalid adj.无效的;不能成立的;
syntax n.语法;句法;句法规则[分析];语构
invalid syntax就是无效语法。这时候,要检查自己的代码语法。
嘻嘻然后记入门学习NPL的今天的代码(还没搞懂代码的意思……)!
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 15 21:00:27 2016
@author: amnesia
"""
from sklearn.datasets import load_iris
iris = load_iris()
# The feature (column) names and the response
print(iris.feature_names)
print(iris.target)
print(iris.target_names)
# The object types of the feature matrix and the response array
print(type(iris.data))
print(type(ir