game-of-life icon indicating copy to clipboard operation
game-of-life copied to clipboard

Fix TypeError: Slice indices should be integers

Open wsyxbcl opened this issue 5 years ago • 0 comments

#7 In k[m/2-1 : m/2+2, n/2-1 : n/2+2] = np.array([[1,1,1],[1,0,1],[1,1,1]]), 'm/2' and 'n/2' are float in Python 3.x, which can't be received as indices in slice.

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

wsyxbcl avatar Mar 27 '19 06:03 wsyxbcl