There is already a reshape() in PDL.

Obviously that only applies to PDL arrays.

But if PDL style arrays get in to the core, then that sort of
functionality ought to arise.

OK here is a basic question: how do we specify element access in
PDL type arrays?

$a[$i][$j][$k] or $a[$i,$j,$k]

Most numerical languages use the second form, because the array
is stored as one big data list, which is indexed, rather than a
a list of lists.

This is important for how we access elements efficiently in compact
arrays - we don't want [][][] to invoke 3 overloaded subroutines, just one.
However one supposes it can be made to work either way.

Comments?


Karl

Reply via email to