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

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

[Octave-bug-tracker] [bug #51333] Reductions on an empty matrix is incon


From: Sarrah Bastawala
Subject: [Octave-bug-tracker] [bug #51333] Reductions on an empty matrix is inconsistent
Date: Mon, 18 Apr 2022 08:44:28 -0400 (EDT)

Follow-up Comment #8, bug #51333 (project octave):

> 
> which although seem to have solved for empty matrices, shows slight
differences when dimensions are specified.

I have understood the mistake in my understanding, and by changing the code
after the reduction has taken place for the special case of an empty matrix, I
was able to procure these results :
 

octave:1> dot([],[])
ans = [](0x0)
octave:2> dot([],[],1)
ans = [](1x0)
octave:3> dot([],[],2)
ans = [](0x1)


which are completely compatible with what Matlab does. I have added some tests
to check for empty inputs, and my changeset passes all pre-existing and new
tests. Please have a look!

(file #53105)

    _______________________________________________________

Additional Item Attachment:

File name: bug51333.patch                 Size:1 KB
    <https://file.savannah.gnu.org/file/bug51333.patch?file_id=53105>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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