candidates_indices = np.vstack(np.where(candidates == 1)).T
list_indices = np.arange(len(candidates_indices))
print(np.sum(candidates), list_indices)
print(len(candidates_indices), candidates_indices.shape)
np.random.shuffle(list_indices)
half_max_spatial_win = np.floor(max_spatial_win / 2.0)
for i in range(0, n_samples):
indices_to_add = candidates_indices[list_indices[i]]
After Change
indices_to_add = candidates_indices[list_indices[i]]
print(max_coords.shape, indices_to_add)
for s in range(0, N_SPATIAL):
max_coords[i, s] = indices_to_add[s] - np.floor(
spatial_win_sizes[0]/2)[s]
// for i in range(0, N_SPATIAL):
// assert uniq_spatial_size[i] >= max_spatial_win[i], \