m-alcu / notebooks

0 stars 1 forks source link

TypeError: slice indices must be integers or None or have an __index__ method #1

Open acv-thanld opened 6 years ago

acv-thanld commented 6 years ago

Dear,

Do you know Why I got this error?

TypeError Traceback (most recent call last)

in () 1 # center the first N/2 points at (-2,-2) ----> 2 X[:N/2,:] = X[:N/2,:] - 2*np.ones((N/2,D)) 3 4 # center the last N/2 points at (2, 2) 5 X[N/2:,:] = X[N/2:,:] + 2*np.ones((N/2,D)) TypeError: slice indices must be integers or None or have an __index__ method
SunnyHarjani commented 5 years ago

Fixed in my fork: https://github.com/m-alcu/notebooks/pull/2