Hi,

index2d it was.

$pdata= index2d($p,$path(0,),$path(1,));

I've somehow never recognised this. After 15 years there are still
things to be learned, cheers!

Ingo

On 22.06.21 16:24, chm wrote:
If the x_i,y_i are indexes then look at PDL::Slices.
index1d applied twice, first for x_i and second for y_i?

On 6/22/2021 9:53 AM, Ingo Schmid wrote:

Hi,

I would appreciate your help with this.

Let's say I have $data(X,Y,T) and a path running from x0..x1, y0..y1.
I would like to efficiently get the x-y data along that path for all
t (0..T-1). $path is a 2xN piddle. The result should be of size N x T.

Of course I can loop over path, but I thought there's a more elegant
solution with slice/dice, maybe?

Thanks

Ingo



_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general



_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to