Traceback (most recent call last):
File "learning_vector.py", line 20, in <module>
net = nl.net.newlvq(nl.tool.minmax(input), 4, [.6, .4])
File "/usr/local/lib/python2.7/dist-packages/neurolab/net.py", line 179, in newlvq
layer_out.np['w'][n][st:i].fill(1.0)
TypeError: slice indices must be integers or None or have an __index__ method
From this page: https://pythonhosted.org/neurolab/ex_newlvq.html
Using numpy 1.13.3 and neurolab 0.3.5
The error message I got was:
I fixed the issue by editing the neurolab/net.py and changing the line 127 from
layer_out.np['w'][n][st:i].fill(1.0)to
layer_out.np['w'][n][int(st):int(i)].fill(1.0)Thanks!
Martin Rioux