[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #36932] Automatic complex->real narrowing remo
From: |
Jordi Gutiérrez Hermoso |
Subject: |
[Octave-bug-tracker] [bug #36932] Automatic complex->real narrowing removes Diagonal property from matrix |
Date: |
Mon, 23 Jul 2012 22:09:25 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110109 Junglestork/3.6.13 |
Follow-up Comment #1, bug #36932 (project octave):
The complex->real thing seems to be a red herring. The problem is the linear
indexing:
octave:1> a = diag([1 2 3]); a(1) = 5
a =
5 0 0
0 2 0
0 0 3
octave:2> a = diag([1 2 3]); a(1,1) = 5
a =
Diagonal Matrix
5 0 0
0 2 0
0 0 3
The offending code is here:
http://hg.savannah.gnu.org/hgweb/octave/file/74c7265c057a/src/ov-base-diag.cc#l118
As you can see, it's checking for indexing of type a(i,i) to preserve
diagonality, but it's not checking any other possible indexing types that
could make sense (e.g. a(i,i,1) or a(i) where i = n^2).
I think I can handle this problem myself.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36932>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/