# HG changeset patch # User Thierry Bertin-Mahieux # Date 1213218697 14400 # Node ID b1da46b9b901c0d49bb49e329fc18fdf41a84d07 # Parent 6441e568745e03c9888ac9c70e8d26f420f44a6f bug fixed when initializing NArraysDataSet with 1-d arrays. This now raises an Exception diff -r 6441e568745e -r b1da46b9b901 dataset.py --- a/dataset.py Wed Jun 11 17:05:56 2008 -0400 +++ b/dataset.py Wed Jun 11 17:11:37 2008 -0400 @@ -1061,6 +1061,9 @@ assert len(fieldnames) > 0 all_matrix_sizes = map(lambda x : numpy.asmatrix(x).shape[0] , data_arrays) num_examples = max(all_matrix_sizes) + if num_examples == 1 : + # problem, do we transpose all arrays? is there only one example? + raise Exception("wrong initialization, unknow behaviour with 1-d arrays") self._fieldnames = fieldnames self._datas = [] for k in range(len(data_arrays)) :