AttributeError: module 'numpy' has no attribute 'random' using numpy package error in python

AttributeError: module 'numpy' has no attribute 'random'
The program has the following error: (The file name cannot be the same as the commonly used package name) Just
insert image description here
change the numpy file name.
It should be noted that after the name is changed, the program will automatically change numpy Change it to a new name. At this time, you need to manually modify the package name.
insert image description here
After modification, it can run normally.
insert image description here

Guess you like

Origin blog.csdn.net/qq_41238751/article/details/108648078