diff liboctave/dNDArray.cc @ 7600:24abf5a702d9

Chop trailing singletons in min/max functions
author David Bateman <dbateman@free.fr>
date Tue, 18 Mar 2008 20:27:50 -0400
parents 8c32f95c2639
children 36594d5bbe13
line wrap: on
line diff
--- a/liboctave/dNDArray.cc	Tue Mar 18 16:39:25 2008 -0400
+++ b/liboctave/dNDArray.cc	Tue Mar 18 20:27:50 2008 -0400
@@ -742,6 +742,9 @@
       idx_arg.elem (i) = xisnan (tmp_max) ? 0 : idx_j;
     }
 
+  result.chop_trailing_singletons ();
+  idx_arg.chop_trailing_singletons ();
+
   return result;
 }
 
@@ -817,6 +820,9 @@
       idx_arg.elem (i) = xisnan (tmp_min) ? 0 : idx_j;
     }
 
+  result.chop_trailing_singletons ();
+  idx_arg.chop_trailing_singletons ();
+
   return result;
 }