python - 'function' object has no attribute 'data' -


from sklearn import datasets  iris=datasets.load_iris x = iris.data --------------------------------------------------------------------------- attributeerror                            traceback (most recent call last) <ipython-input-15-12a2d725131f> in <module>() ----> 1 x = iris.data  attributeerror: 'function' object has no attribute 'data  load iris dataset sklearn ,but when write "x = iris.data",an error occur "attributeerror: 'function' object has no attribute 'data'" 

load_iris function , needs called such:

from sklearn import datasets  iris=datasets.load_iris() x = iris.data 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -