I would like to give some feedback about ...
From: https://checkio.org/mission/count-neighbours/solve/
HTTP_USER_AGENT:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
import numpy as np
def count_neighbours(grid, row, col):
sum = 0
grid = np.array(grid)
for i in range (3):
for j in range (3):
i1 = row+i-1
j1 = col+j-1
if (i1>=0) & (j1>=0) & (i1
return sum - grid[row, col]
Here's my code for the question, it runs find on my anaconda python but not on the website.
Created at: 2016/08/30 04:24; Updated at: 2016/08/30 16:17