# HG changeset patch # User David Bateman # Date 1221677822 14400 # Node ID 587eee4120ff2652ebbe303a639e12a169abc341 # Parent fdc7c91835ab7fdc71e60f6237be0d3dd14f0561 cut trailing singeltons in cat function diff -r fdc7c91835ab -r 587eee4120ff src/ChangeLog --- a/src/ChangeLog Wed Sep 17 14:52:51 2008 -0400 +++ b/src/ChangeLog Wed Sep 17 14:57:02 2008 -0400 @@ -1,5 +1,7 @@ 2008-09-17 David Bateman + * data.cc (do_cat): Chopping trailing singleton dimensions. + * data.cc (SINGLE_TYPE_CONCAT, DO_SINGLE_TYPE_CONCAT): New macros (do_cat): Special case single type concatenations for speed. * pt.mat.cc (std::string get_concat_class (const std::string&, diff -r fdc7c91835ab -r 587eee4120ff src/data.cc --- a/src/data.cc Wed Sep 17 14:52:51 2008 -0400 +++ b/src/data.cc Wed Sep 17 14:57:02 2008 -0400 @@ -1853,6 +1853,10 @@ dv_tmp (dim) : 1); } + // Reshape, chopping trailing singleton dimensions + dv.chop_trailing_singletons (); + tmp = tmp.reshape (dv); + retval = tmp; } else