Numpy运行报错

1,VisibleDeprecationWarning: Reading unicode strings without specifying the encoding argument is deprecated. Set the encoding, use None for the system default.

#iris数据集分析
url='https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data'
iris=np.genfromtxt(fname=url,delimiter=',',dtype=None)
names = ('sepallength', 'sepalwidth', 'petallength', 'petalwidth', 'species')


print("dtype=object的返回结果样式:\n",iris[:4])

 

dtype=None,运行会报如下错误警告

 

posted @ 2020-04-07 22:20  limalove  阅读(796)  评论(0)    收藏  举报