[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: |
Wed, 26 Oct 2022 20:17:48 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?63277>
Summary: isfinite returns full array in Matlab for sparse
input
Project: GNU Octave
Submitter: rik5
Submitted: Wed 26 Oct 2022 05:17:46 PM PDT
Category: Octave Function
Severity: 2 - Minor
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Wed 26 Oct 2022 05:17:46 PM PDT By: Rik <rik5>
In changeset 800eb86438cc a modification was made to avoid using isfinite() on
sparse input. I'm not sure what problem that was addressing, but it did lead
me to find a difference between Octave and Matlab.
Sample code:
MATLAB
x = sparse ([Inf, 1; 2 NaN]);
isfinite (x)
ans = 2x2 logical array
1 0
1. 1
Octave
ans =
Compressed Column Sparse (rows = 2, cols = 2, nnz = 2 [50%])
(2, 1) -> 1
(1, 2) -> 1
I don't know if we want to follow Matlab or not. It seems like this is
inconsistent with isinf() and isnan() functions which do return a sparse
output for sparse input in Matlab. Octave is arguably being correct here by
keeping that pattern.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63277>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63277] isfinite returns full array in Matlab for sparse input,
Rik <=