bugGNU Octave - Bugs: bug #46110, broadcasting with diagonal...


bug #46110: broadcasting with diagonal matrices fails for addition

Submitted by:  jan <pfa>
Submitted on:  Sat 03 Oct 2015 09:56:23 AM UTC  
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  4.0.0 Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

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


Sat 03 Oct 2015 02:15:10 PM UTC, comment #2: 

Which is in turn a dupe of bug #35787. Marking as duplicate and closing.

Mike Miller <mtmiller>
Project Administrator
Sat 03 Oct 2015 10:08:41 AM UTC, comment #1: 

sorry for a dublicate:

please  make this a comment on
bug #39462: Diagonal matrices do not broadcast

jan <pfa>
Sat 03 Oct 2015 09:56:23 AM UTC, original submission:  

Broadcasting for diagonal matrices fails in general for addition in the releases 3.8.2, 4.0.0, and dev. Broadcasting works in the case of addition of a scalar and returns then a full matrix.

A related bug is addresses for the case of sparse matrices in the bug #41441: "Broadcasting does not behave properly on sparse matrices".

>> diag([1,2])+[0;0]
error: operator +: nonconformant arguments (op1 is 2x2, op2 is 2x1)

>> sparse(diag([1,2]))+[0;0]
error: operator +: nonconformant arguments (op1 is 2x2, op2 is 2x1)

>> full(sparse(diag([1,2])))+[0;0]
ans =

   1   0
   0   2

>> diag([1;2])+0
ans =

   1   0
   0   2

>> sparse(diag([1;2]))+[0]
ans =

   1   0
   0   2

jan <pfa>


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

Attach Files:

No files currently attached


   bug dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by pfa (Submitted the item)

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

    Only project members can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-10-03 mtmiller StatusNone => Duplicate
        Open/ClosedOpen => Closed
        Dependencies- => Depends on bugs #35787

    Back to the top

    Powered by Savane 3.7