Skip to content

Instantly share code, notes, and snippets.

@yvan
Created November 7, 2017 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yvan/373057728d000886e8eca3dbd350ba84 to your computer and use it in GitHub Desktop.
Save yvan/373057728d000886e8eca3dbd350ba84 to your computer and use it in GitHub Desktop.
world_noise = np.zeros_like(world)
for i in range(shape[0]):
for j in range(shape[1]):
world_noise[i][j] = (world[i][j] * circle_grad[i][j])
if world_noise[i][j] > 0:
world_noise[i][j] *= 20
# get it between 0 and 1
max_grad = np.max(world_noise)
world_noise = world_noise / max_grad
toimage(world_noise).show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment