[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45219] Incorrect behavior with broadcasting a
From: |
Michael C. Grant |
Subject: |
[Octave-bug-tracker] [bug #45219] Incorrect behavior with broadcasting and mixed real/complex matrices |
Date: |
Sat, 30 May 2015 19:12:27 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3 |
Follow-up Comment #1, bug #45219 (project octave):
Sorry, markup typo cut off the report. Here it is again.
t1 = randn(6,3)+1j*randn(6,3);
t2 = randn(6,1);
s1 = sparse(t1);
s2 = sparse(t2);
These work fine:
t1 + t2
bsxfun( @plus, t1, t2 )
These fail, each in different ways, but they should produce the same results
as above, only sparse:
>> s1 + s2
error: operator +: nonconformant arguments (op1 is 6x3, op2 is 6x1)
>> bsxfun(@plus,s1,s2)
error: concatenation operator not implemented for '<unknown type>' by 'sparse
complex matrix' operations
Matlab does the correct thing with the bsxfun functions, but of course it does
not consider the bare additions to be correct.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45219>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/