Skip to content

Instantly share code, notes, and snippets.

@charlieoneill11
Last active June 28, 2022 09:45
Show Gist options
  • Save charlieoneill11/09a35e6604eb81916f8aebd8be8d6e49 to your computer and use it in GitHub Desktop.
Save charlieoneill11/09a35e6604eb81916f8aebd8be8d6e49 to your computer and use it in GitHub Desktop.
N = 100 # number of samples
L = 1000 # length of each sample (number of values for each sine wave)
T = 20 # width of the wave
x = np.empty((N,L), np.float32) # instantiate empty array
x[:] = np.arange(L)) + np.random.randint(-4*T, 4*T, N).reshape(N,1)
y = np.sin(x/1.0/T).astype(np.float32)
@theorieken
Copy link

Yeah - removing that error will significantly boost the credibility of your article

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