octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61690] Behavior of sum() with empty inputs


From: Guillaume
Subject: [Octave-bug-tracker] [bug #61690] Behavior of sum() with empty inputs
Date: Fri, 17 Dec 2021 09:24:00 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0

URL:
  <https://savannah.gnu.org/bugs/?61690>

                 Summary: Behavior of sum() with empty inputs
                 Project: GNU Octave
            Submitted by: gyom
            Submitted on: Fri 17 Dec 2021 02:23:58 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: guillaume
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

There is a difference between Octave and Matlab with sum() when the first
input is empty and a dimension is provided:

Octave:


octave:1> sum([])
ans = 0
octave:2> sum([],1)
ans = 0


Matlab:


>> sum([])
ans =
     0
>> sum([],1)
ans =
  1x0 empty double row vector





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61690>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]