Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 412
Hoda Fakharzadeh Avatar asked Jan 12 '18 22:01

Hoda Fakharzadeh


1 Answers

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

like image 51
Hoda Fakharzadeh Avatar answered Oct 16 '22 14:10

Hoda Fakharzadeh