(May-26-2019, 03:25 AM)aapurdel Wrote: I renamed the file we are talking about above, __init__.py to numpy.pyThis is and old Thread,and no you should not at all rename
__init__.py to numpy.py
This was about that naming a fie yourself to
numpy.py
,then it shadow the real numpy.py
in library.So here it was only talked about rename
numpy.py
(if make that name yourself) to a other name eg my_numpycode.py
.Quote:I run >>> np.__file__ 'C:\Adrian\Python37\Lib\numpy-1.11.2\numpy\numpy.py'You have the return value that should not be there.
>>> import numpy as np >>> np.__file__ # Nothing here 'C:\\python37\\lib\\site-packages\\numpy\\__init__.py' # If work then it work >>> np.arange(10, 30, 5) array([10, 15, 20, 25])