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: Sarrah Bastawala
Subject: [Octave-bug-tracker] [bug #61690] Behavior of sum() with empty inputs
Date: Thu, 2 Mar 2023 06:58:24 -0500 (EST)

Follow-up Comment #18, bug #61690 (project octave):

[comment #17 comment #17:]
> patch still applies cleanly.  can we add self tests to this to verify that
it gets sum to behave appropriately for empty inputs and prevent future
rejections?

Yes, so according to the changes I had made, I had added more tests in
addition with the existing ones to make sure the changes are as desired. These
are implemented for the `cumsum, cumprod, sum and prod` functions in the
`libinterp/corefcn/data.cc` file. 
  
> @sarrah, can you comment on how this does or doesn't relate to bug #51333? 
sum is mentioned there, and you have a patch sitting there for dot.  is this
report just duplicative of one of the bugs mentioned there?

According to my understanding, it's not exactly a duplicate. Afaik, the
expected output i.e the way it should react to empty inputs/outputs and the
underlying logic is same. 

However, the changes to be made are in two complete different files and hence
the two different bugs seem correct to me.

Also, in accordance to how @siko1056 has mentioned in
https://savannah.gnu.org/bugs/index.php#comment1 , the main change in source
code in my patch too has been done in the `liboctave/operators/mx-inlines.cc`
file, where the main function `do_mx_red_op` is called in the functions whose
tests now show the expected change.


    _______________________________________________________

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]