[Bugzilla] [Bug 13829] New: Mean and sum functions return wrong array type

bugzilla.admin at scilab.org bugzilla.admin at scilab.org
Thu Apr 16 11:19:16 CEST 2015


http://bugzilla.scilab.org/show_bug.cgi?id=13829
--------- Bug Summary -----------
Mean and sum functions return wrong array type

---------- Changed by ------------
peterddrummond at gmail.com

---------- What changed ----------
bug_id, short_desc, product, version, rep_platform, op_sys, bug_status, bug_severity, priority, component, assigned_to, reporter


            Bug ID: 13829
           Summary: Mean and sum functions return wrong array type
           Product: Scilab software
           Version: 5.2.2 final version
          Hardware: Other
                OS: All Mac OS X
            Status: NEW
          Severity: Major
          Priority: P5
         Component: Scilab
          Assignee: bugzilla.admin at scilab.org
          Reporter: peterddrummond at gmail.com

BUG DESCRIPTION:
----------------
The mean and sum functions return the wrong array type when processing an n dimensional array and summing the last element with n>3. They should
return an n dimensional array in which the first n-1 dimensions are unchanged, and the last dimension is one, according to the documentation.
Instead, the lower dimensions are scrambled into the wrong order.

ERROR LOG:
----------


HOW TO REPRODUCE THE BUG:
-------------------------

The bug is easily replicated from the terminal. Enter a = ones(1,2,3,4), then m = mean(a,4). The output  should be ones(1,2,3,1). Instead, it is:

m  =

(:,:,1)

    1.  
    1.  
    1.  
(:,:,2)

    1.  
    1.  
    1.  

This is the same as ones(3,1,2), which is the wrong dimension. 




OTHER INFORMATION:
------------------

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/bugzilla/attachments/20150416/d673836b/attachment.htm>


More information about the Bugzilla mailing list