# HG changeset patch # User David Bateman # Date 1221677822 14400 # Node ID 587eee4120ff2652ebbe303a639e12a169abc341 # Parent fdc7c91835ab7fdc71e60f6237be0d3dd14f0561 cut trailing singeltons in cat function diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --git a/src/data.cc b/src/data.cc --- a/src/data.cc +++ b/src/data.cc @@ -1853,6 +1853,10 @@ dv_tmp (dim) : 1); } + // Reshape, chopping trailing singleton dimensions + dv.chop_trailing_singletons (); + tmp = tmp.reshape (dv); + retval = tmp; } else