I got stuck in the excise 2 “samples”. I got the following massage:
TypeError: object of type ‘builtin_function_or_method’ has no len()
Even though I changed the code w/o len() for debugging, I still go the same error above. It seems to me that the old code was run instead of new code. Could you help me?
in concrete:
I added one line code yl= len(y) for debugging and then delete it. But I still get the following message:
57 # (see additional hints above)
58 yl = len(y)
—> 59 idx = np.random.choice(range(yl), p = y.ravel)
60
61 # Append the index to “indices”
mtrand.pyx in numpy.random.mtrand.RandomState.choice()
TypeError: object of type ‘builtin_function_or_method’ has no len()
In the test code I just wrote range(10) instead of (yl), but still go above message.