In [15]:
from neuralnilm.source import ToySource
import matplotlib.pyplot as plt
from Queue import Empty

In [2]:
source = ToySource(100, 1)

In [3]:
X, y = source.gen_data()

In [6]:
fig, axes = plt.subplots(2, sharex=True)
axes[0].plot(X[0,:,0])
axes[1].plot(y[0,:,0])
plt.show()

In [16]:
try:
    source.queue.get(block=False)
except Empty:
    print "empty yo"


empty yo

In [ ]: