summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorot1 <andreas@maunz.de>2011-11-24 09:44:26 +0100
committerot1 <andreas@maunz.de>2011-11-24 09:44:26 +0100
commit13c5620a5380e90f21a267d7985c4dba0c7c6b14 (patch)
tree63bea46e2089472c3ea1d0a8839261899213b877
parent88130e249353e778f7d4b587fe08abad6b72b206 (diff)
Fixed underrun of featuresnumeric
-rw-r--r--lib/algorithm.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb
index d833aa8..8bce638 100644
--- a/lib/algorithm.rb
+++ b/lib/algorithm.rb
@@ -426,6 +426,8 @@ module OpenTox
maxcols = params[:maxcols]
nr_cases, nr_features = get_sizes n_prop
+ maxcols = nr_features if maxcols > nr_features
+
data_matrix = GSL::Matrix.alloc(n_prop.flatten, nr_cases, nr_features)
query_matrix = GSL::Matrix.alloc(q_prop.flatten, 1, nr_features) # same nr_features