Skip to content

Commit 5c0f472

Browse files
committed
Allow to import rnnrbm.py even with pylab is not available.
This is needed for tests.
1 parent ea3096f commit 5c0f472

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

code/rnnrbm.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44
# More information at http://deeplearning.net/tutorial/rnnrbm.html
55

66
import glob
7-
import numpy
8-
import pylab
97
import sys
108

9+
import numpy
10+
try:
11+
import pylab
12+
except ImportError:
13+
print "pylab isn't available, if you use their fonctionality, it will crash"
14+
print "It can be installed with 'pip install -q Pillow'"
15+
1116
from midi.utils import midiread, midiwrite
1217
import theano
1318
import theano.tensor as T

0 commit comments

Comments
 (0)