How to fix AttributeError: module 'numpy' has no attribute 'square' [closed]

风格不统一 提交于 2019-12-01 01:55:00

问题


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

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

Here are my imports:

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

回答1:


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



来源:https://stackoverflow.com/questions/48235169/how-to-fix-attributeerror-module-numpy-has-no-attribute-square

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!