如何修复AttributeError:模块'numpy'没有属性'square' [英] How to fix AttributeError: module 'numpy' has no attribute 'square'

查看:118
本文介绍了如何修复AttributeError:模块'numpy'没有属性'square'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将numpy更新为1.14.0.我使用Windows10.我尝试运行我的代码,但出现此错误:

I have updated numpy to 1.14.0. I use Windows 10. I tried to run my code and I got this error:

AttributeError:模块'numpy'没有属性'square'

AttributeError: module 'numpy' has no attribute 'square'

这是我的进口货

%matplotlib inline
import matplotlib.pyplot as plt
import tensorflow as tf
import numpy as np
from sklearn.metrics import confusion_matrix
import math

推荐答案

我删除了numpy.py,然后更新了numpy,它起作用了!

I removed numpy.py then updated my numpy and it worked!

这篇关于如何修复AttributeError:模块'numpy'没有属性'square'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆