[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #36665] ppval fails when pp.dim > 1 and xi is
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #36665] ppval fails when pp.dim > 1 and xi is an array |
Date: |
Mon, 02 Jul 2012 17:23:05 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1 |
Follow-up Comment #5, bug #36665 (project octave):
Just a small efficiency question.
In the patch, a column vector is created using the (:) syntax. This is then
tiled up using repmat to a larger array using repmat ([1, prod(d)]). Finally,
a transpose of the matrix is performed to turn the multiple column vectors
into row vectors.
Transpose is very fast. Still, wouldn't it be more efficient to transpose the
smaller object, the column vector, rather than the larger object, the complete
matrix?
Current Code:
dx = (xi - x(idx))(:);
dx = repmat (dx, [1, prod(d)])';
Proposed Code:
dx = (xi - x(idx))(:)';
dx = repmat (dx, [prod(d)], 1);
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36665>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/