bugGNU Octave - Bugs: bug #40089, bsxfun fails with logical...

 
 

bug #40089: bsxfun fails with logical operation on sparse matrices

Submitter:  David Spies <dspyz>
Submitted:  Sun 22 Sep 2013 10:40:25 PM UTC
   
 
Category:  Octave Function Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  dspyz Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 29 Feb 2016 02:27:26 AM UTC, comment #3: 

I applied Lachlan's patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/a1aa52bff079).  Closing report.

Rik <rik5>
Group administrator
Sat 16 Jan 2016 09:54:19 AM UTC, comment #2: 

The trivial patch for bug #45219 also fixes this problem.  I'm attaching a changeset.

(file #36056)

Lachlan Andrew <lachlan>
Thu 26 Sep 2013 05:09:57 PM UTC, comment #1: 

Confirmed.  As a workaround, if you convert both inputs to logical type, then bsxfun works.


bsxfun (@and,logical (cliques), logical (v))


This isn't that bad because cliques will still stay as a sparse bool matrix.  v is small enough that there probably isn't much point in converting it to a sparse matrix but you could also do "sparse (logical (v))" and bsxfun will still work.

Rik <rik5>
Group administrator
Sun 22 Sep 2013 10:40:25 PM UTC, original submission:  

When attempting to use bsxfun to @and a matrix with a vector

cliques = sparse([1,1,2,2],[1,2,2,3],[1,1,1,1],2,5)
v = [1,0,1,0,1]

bsxfun(@and,cliques,v)

I get

error: concatenation operator not implemented for '<unknown type>' by 'sparse matrix' operations

David Spies <dspyz>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #36056:  bug_45219.cset added by lachlan (987B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lachlan (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by dspyz (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-29 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2016-01-16 lachlan Attached File- Added bug_45219.cset, #36056
    2013-09-26 rik5 Severity3 - Normal 2 - Minor
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code