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

 
 

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

Submitted by:  David Spies <dspyz>
Submitted on:  Sun 22 Sep 2013 10:40:25 PM UTC  
 
Category: Octave FunctionSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: dspyzOpen/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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.

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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 26 Sep 2013 05:09:57 PM UTCrik5Severity3 - Normal=>2 - Minor
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup