# HG changeset patch # User Pascal Lamblin # Date 1254928669 14400 # Node ID 3f44379177b26c89c6cab31ffbfe657ba13d2283 # Parent 9945cd79fe7951cd6e3d0141214c4654c02223ea More descriptive error message when fpconst is missing. diff -r 9945cd79fe79 -r 3f44379177b2 pylearn/datasets/MNIST.py --- a/pylearn/datasets/MNIST.py Wed Sep 30 17:15:01 2009 -0400 +++ b/pylearn/datasets/MNIST.py Wed Oct 07 11:17:49 2009 -0400 @@ -53,11 +53,11 @@ def full(): return train_valid_test() -#usefull for test, keep it +#useful for test, keep it def first_10(): return train_valid_test(ntrain=10, nvalid=10, ntest=10) -#usefull for test, keep it +#useful for test, keep it def first_100(): return train_valid_test(ntrain=100, nvalid=100, ntest=100) diff -r 9945cd79fe79 -r 3f44379177b2 pylearn/io/pmat.py --- a/pylearn/io/pmat.py Wed Sep 30 17:15:01 2009 -0400 +++ b/pylearn/io/pmat.py Wed Oct 07 11:17:49 2009 -0400 @@ -36,7 +36,12 @@ #import numarray, sys, os, os.path import numpy.numarray, sys, os, os.path -import fpconst +try: + import fpconst +except ImportError: + print 'Python library fpconst is needed but not installed,' + print 'please install it using your favorite package manager.' + raise def array_columns( a, cols ): indices = None