Am 25.12.2018 um 20:51 schrieb Riccardo (Jack) Lucchetti:
On Tue, 25 Dec 2018, Allin Cottrell wrote:
> On Tue, 25 Dec 2018, Riccardo (Jack) Lucchetti wrote:
>
>> Dear all (and merry Xmas to you),
>>
>> we don't have 3-D arrays like Matlab has, but we do have matrix
>> arrays, which you can more or less use to the same effect. I thought
>> it would be nice to have a function (provisionally called
>> coresample(), as in those holes you drill through the ground) that
>> fills a matrix with selected elements from a matrix array.
I've had thoughts like this as well, I agree it's a natural wish.
>> (i) is this useful enough to be made a standard function, or
should
>> we just mention this kind of technique in the cheat sheet chapter (if
>> at all?)
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.
> It's certainly cute. I'm not sure about its usefulness --
do you have
> applications in mind?
one could store IRFS as an h-array of (n x n) matrices,
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.
cheers,
sven