python中FutureWarning问题解决方法

np.array([0,1,2]) == None
出现:
FutureWarning: comparison to `None` will result in an elementwise object comparison in the future
解决方法:将 == 改为 is 
Also, have you tried is None instead of == None? AFAIK, is can not be overwritten, so numpy.array could not define an element-wise is operation.
http://stackoverflow.com/questions/33954216/comparison-to-none-will-result-in-an-elementwise-object

你可能感兴趣的:(编程语言)