This way conversion of NaNs to integer types won't throw an exception.
def povodi(height_map):
height_map = np.array(height_map)
- calced = height_map.astype('bool')
- calced.fill(0)
- result = height_map.astype("uint32")
- result.fill(1)
+ calced = np.zeros(height_map.shape, dtype='bool')
+ result = np.ones(height_map.shape, dtype="uint32")
to_calc = []
it = np.nditer(height_map, flags=['multi_index'])
for el in it: