Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
ndimage solution in 3rd party category for Calculate Islands by gyahun_dash
from scipy import ones
from scipy.ndimage import label
def checkio(data):
labels, num = label(data, structure=ones([3, 3]))
return sorted(labels[labels == i].size for i in range(1, num + 1))
Jan. 8, 2017
Comments: