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
4

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

2
Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest