AttributeError: type object 'numpy.ndarray' has no attribute '__array_function__'

  • A+
Category:Languages

I upgraded numpy to the latest version and now I am getting following error on importing numpy:

AttributeError: type object 'numpy.ndarray' has no attribute 'array_function'

I am using numpy version 1.16.

 


Uninstall all installs of Numpy using

pip uninstall numpy 

for python3

pip3 uninstall numpy 

You may need to run it twice as two versions of numpy may be installed Then run

pip install numpy 

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: