[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45542] griddatan unable to perform 4-dimensio
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #45542] griddatan unable to perform 4-dimensional interpolation. |
Date: |
Fri, 12 Jul 2019 15:43:04 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Update of bug #45542 (project octave):
Status: In Progress => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #8:
I checked in a new fix here
(https://hg.savannah.gnu.org/hgweb/octave/rev/3f354ef16400).
Apparently the code had not been reviewed in a very long while because there
were lots of obvious problems. We were calculated an intermediate variable
three times rather than just once and re-using it. And there was this bit of
code that was not used at all, but involved quite a bit of calculation.
- ## assign x,y for each point of simplex
- xt = reshape (x(tri(tri_list,:),:), [nr_t, n+1, n]);
- yt = y(tri(tri_list,:));
The problem turned out to be caused by the orientation rules when doing
vector/matrix indexing versus vector/vector indexing. In the first, the
result takes the shape of the matrix index. In the latter, the shape is that
of the vector being indexed rather than the index vector. I added a special
case to resolve this.
+ if (isscalar (tri_list))
+ ## Special case required by orientation rules for vector/vector index.
+ yi(valid) = sum (y(tri(tri_list,:)).' .* bary_list, 2);
+ else
+ yi(valid) = sum (y(tri(tri_list,:)) .* bary_list, 2);
endif
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?45542>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/