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

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

[Octave-bug-tracker] [bug #58215] sparse multiplication with Inf


From: Guillaume
Subject: [Octave-bug-tracker] [bug #58215] sparse multiplication with Inf
Date: Fri, 24 Apr 2020 09:22:00 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #5, bug #58215 (project octave):

Thanks for the feedback and extra readings. So, in Matlab, one departure of
the behavior you describe is when one of the operands is a scalar:


Inf * sparse (2, 2, 0)
Inf (2, 2) * sparse (2, 2, 0)


where Matlab returns this:


>> Inf * sparse (2, 2, 0)
ans =
   (1,1)      NaN
   (2,1)      NaN
   (1,2)      NaN
   (2,2)      NaN
>> Inf (2, 2) * sparse (2, 2, 0)
ans =
     0     0
     0     0


I am starting to feel a little uneasy when adding to this the Diagonal
matrices that Octave has but not Matlab:


eye (2) * [Inf; 1]
speye (2) * [Inf; 1]
[1, 0; 0, 1] * [Inf; 1]
disable_diagonal_matrix (true)
eye (2) * [Inf; 1]


and if sparse matrices can automatically mutate to full matrices with
sparse_auto_mutate then it becomes very difficult to know which operation will
take place.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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