Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
scipy.ndimage.find_objects solution in 3rd party category for Ground for the House by flpo
from scipy.ndimage import find_objects
import numpy as np
def house(plan):
matrix = np.matrix([[c != '0' for c in row] for row in plan.split()])
ground = find_objects(matrix)
return matrix[ground[0]].size if ground else 0
Sept. 6, 2018