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

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

[Octave-bug-tracker] [bug #63277] isfinite returns full array in Matlab


From: Rik
Subject: [Octave-bug-tracker] [bug #63277] isfinite returns full array in Matlab for sparse input
Date: Thu, 27 Oct 2022 17:12:35 -0400 (EDT)

Update of bug #63277 (project octave):

              Item Group:    Matlab Compatibility => WTF, Matlab?!?         

    _______________________________________________________

Follow-up Comment #3:

I posted this bug report because I wanted other developer opinions.  My own
opinion matches that of jwe: Matlab made an odd choice to have isfinite return
a full matrix.  Not only is this inconsistent with similar isXXX functions,
but it presumes to know more than the programmer.  In this case, the
intermediate "isfinite (x)" will be dense but "! isfinite (x)" will be back to
being pretty sparse.  I think the programmer should make the decision here. 
If they want a full matrix they can use full(), otherwise it stays as it's
original type.  As another example, would you expect a function to convert a
single data type to a double data type without the consent of the programmer?


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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