rougier / from-python-to-numpy

An open-access book on numpy vectorization techniques, Nicolas P. Rougier, 2017
http://www.labri.fr/perso/nrougier/from-python-to-numpy
Other
2.06k stars 340 forks source link

find_index #76

Open pa-beaufort opened 6 years ago

pa-beaufort commented 6 years ago

Hello,

When I run the script find_index.py, I get the following error

 $ python find_index.py 
Traceback (most recent call last):
  File "find_index.py", line 68, in <module>
    index = find_index(base,Z)
NameError: name 'find_index' is not defined

If I replace find_index with find_view within the scope of __main__, it seems to work

 $ python find_index.py 
True
True
True
True
True
True
True
rougier commented 6 years ago

Thanks for the report and tou're right, it is an error ! Can you make a Pull Request to fix the problem?