comparison src/data.cc @ 11241:80e01d79cf80

special case for concatenation of empty matrices
author John W. Eaton <jwe@octave.org>
date Thu, 11 Nov 2010 14:53:26 -0500
parents 94d9d412a2a0
children 0090bb47d0b5
comparison
equal deleted inserted replaced
11240:b19cfcd6a5c7 11241:80e01d79cf80
1883 %!assert (testcat('uint64', 'double', 'uint64', false)); 1883 %!assert (testcat('uint64', 'double', 'uint64', false));
1884 %!assert (testcat('single', 'uint64', 'uint64', false)); 1884 %!assert (testcat('single', 'uint64', 'uint64', false));
1885 %!assert (testcat('uint64', 'single', 'uint64', false)); 1885 %!assert (testcat('uint64', 'single', 'uint64', false));
1886 %!assert (testcat('uint64', 'uint64', 'uint64', false)); 1886 %!assert (testcat('uint64', 'uint64', 'uint64', false));
1887 1887
1888 %! assert (cat (3, [], [1,2;3,4]), [1,2;3,4]); 1888 %!assert (cat (3, [], [1,2;3,4]), [1,2;3,4]);
1889 %! assert (cat (3, [1,2;3,4], []), [1,2;3,4]); 1889 %!assert (cat (3, [1,2;3,4], []), [1,2;3,4]);
1890 %! assert (cat (3, [], [1,2;3,4], []), [1,2;3,4]); 1890 %!assert (cat (3, [], [1,2;3,4], []), [1,2;3,4]);
1891 %! assert (cat (3, [], [], []), zeros (0, 0, 3)); 1891 %!assert (cat (3, [], [], []), zeros (0, 0, 3));
1892
1893 %!assert (cat (3, [], [], [1,2;3,4]), [1,2;3,4]);
1894 %!assert (cat (4, [], [], [1,2;3,4]), [1,2;3,4]);
1895 %!error <dimension mismatch> cat (3, cat (3, [], []), [1,2;3,4]);
1896 %!error <dimension mismatch> cat (3, zeros (0, 0, 2), [1,2;3,4]);
1892 1897
1893 */ 1898 */
1894 1899
1895 static octave_value 1900 static octave_value
1896 do_permute (const octave_value_list& args, bool inv) 1901 do_permute (const octave_value_list& args, bool inv)