On Wed, 26 Dec 2018, Sven Schreiber wrote:
Currently I don't think it should be a built-in function.
Compared to
indexing and slicing in a 2-D matrix it is a workaround and looks second
class.
[...]
I think there are many applications, for example when you run
simulations and
the 3rd dimension is a parameter that you're varying. But OTOH you quickly
get to the N-dim case, which is the reason why languages like Python/Numpy
have N-D arrays. So not so clear whether a lot of effort should go into the
3-D case.
On Thu, 27 Dec 2018, Ioannis A. Venetis wrote:
Very useful particularly in simulations as Sven mentioned but also
potentially in many big data applications
> (ii) in case the answer is yes, should we add this to libgretl or just
> provide the function in the "extra" addon?
The more functions (well documented and fast) the better... I would go
for libgretl
Ok, I've thought a little about it. I believe the best course of action
is the following:
(i) the function is there, anyone can use it in their own scripts (no
drawbacks that I can see)
(ii) if we find ourselves re-using this function over and over, then we
may add it to the extra package (drawback: it does look a bit clunky,
compared to n-dimensional arrays à la Juila/Python/Matlab, but OTOH I
don't see hansl having these in the foreseeable future, so we might as
well live with it).
(iii) if serious performance issues come up, implement it in C and make it
part of libgretl (drawback: I am a bit wary of having a
too-densely-populated namespace, but I'm open to changing my mind).
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------