import numpy as np
import quantities as pq
from neo.core import SpikeTrain
import scipy.io


def generate_data():

    times_int = []
    times_float = []

    np.random.seed(1138)
    for i in range(3):
        times_int.append(np.random.randint(0, 100, 20).tolist())
        times_float.append([round(np.random.uniform(0, 100), 3) for x in range(20)])

    for elem in times_int:
        elem = elem.sort()
    for elem in times_float:
        elem = elem.sort()

    print(times_int)
    print(times_float)
    return times_int, times_float

times_int, times_float = generate_data()

data_folder = '../data/'
np.save(data_folder + 'times_int.npy', times_int)   #delete file before saving
scipy.io.savemat(data_folder + 'times_int.mat', {"times_int": times_int})
np.save(data_folder + 'times_float.npy', times_float)   #delete file before saving
scipy.io.savemat(data_folder + 'times_float.mat', {"times_float": times_float})