Trailing singletons in min/max functions

David Bateman adb014 at gmail.com
Tue Mar 18 16:08:10 CDT 2008


John W. Eaton wrote:
> On 17-Mar-2008, David Bateman wrote:
> 
> | Both 3.0.x and 3.1.x leave trailing singletons in the matrices they
> | return.. This can be seen with
> | 
> | x = reshape (1:8,[2,2,2]);
> | [y, i ] = min (x, [], 3);
> | size(y)
> | 
> | The attached patch addresses this, moves the min/max tests from
> | test_arith.m to minmax.cc and adds an additional test for this issue. It
> | also fixes a possible 64-bit indexing issue..
> 
> Wouldn't it be better to chop the trailing singletons in the min/max
> functions in the dNDArray.cc and CNDArray.cc files so that the
> behavior is the same in liboctave and the scripting language?
> 
> jwe


Of course you're right, new changeset attached.

D.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch7717
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080318/f9b5d4dd/attachment.ksh 


More information about the Bug-octave mailing list