Skip to content

Commit

Permalink
Remove unused math import
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaixhin authored and soumith committed Oct 1, 2017
1 parent 9fe431e commit aa7adf0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions time_sequence_prediction/generate_sine_wave.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import math
import numpy as np
import torch

np.random.seed(2)

T = 20
L = 1000
N = 100
np.random.seed(2)

x = np.empty((N, L), 'int64')
x[:] = np.array(range(L)) + np.random.randint(-4*T, 4*T, N).reshape(N, 1)
x[:] = np.array(range(L)) + np.random.randint(-4 * T, 4 * T, N).reshape(N, 1)
data = np.sin(x / 1.0 / T).astype('float64')
torch.save(data, open('traindata.pt', 'wb'))

0 comments on commit aa7adf0

Please sign in to comment.