[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55141] sparse matrix/vector comparison
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #55141] sparse matrix/vector comparison |
Date: |
Fri, 30 Nov 2018 23:47:31 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063 |
Update of bug #55141 (project octave):
Category: None => Interpreter
Status: None => Duplicate
Open/Closed: Open => Closed
Depends on: => bugs #41441
_______________________________________________________
Follow-up Comment #1:
Unfortunately this is a known bug involving broadcasting. See bug #41441.
For the time being, you should use repmat to create a comparison array from
the single column vector. Along the lines of
A = [1 3; 7 5]; b = [2; 6];
b = repmat (b, [1, columns(A)]);
sparse (A) < sparse (b)
This will work in Octave or Matlab.
Marking as a duplicate and keeping the original report at bug #41441 open.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55141>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/