Skip to content

Instantly share code, notes, and snippets.

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 guillaume-chevalier/363b58356614b87da2baba8564a19459 to your computer and use it in GitHub Desktop.
Save guillaume-chevalier/363b58356614b87da2baba8564a19459 to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pyplot as plt
import math
b = 8
a = 2**b
x = np.array([[math.cos(0.5**i*x*2*math.pi) for x in range(0, a)] for i in range(1, b+1)])
# Looks like a progression of binary numbers, but with float values.
plt.imshow(x)
plt.show()
@guillaume-chevalier
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment