Complex number indexing for rank 2 arrays sounds cute, but it has a
couple issues:

(0) real numbers are a subset of complex, but the shape of real number
indexing would become different from the shape of complex number
indexing

(1j1) computed indexes (e.g. i.) do not get simpler computations this way

A much more convenient approach would be an alternate Amend
implementation which used rank 1 to specify indices rather than rank
0.

This is not as easy as it sounds, nor as convenient.

That said, if this had been done in the original implementation, then
a sentence like:

"If 2>#$y we ravel each item in the indices"

would have gotten us the convenience we like for atomic indices.

Thanks,

-- 
Raul


On Thu, Dec 14, 2017 at 12:37 PM, David Lambert <[email protected]> wrote:
> Because tables are a common data structure, is there interest in shorthand
> indexing for them?
>
>    (<+.2j5) { i.8 8
> 21
>
>
> Note 'concept'
>    let the index be
>    (<2j5) { rank 2 or higher
>
>    or even
>    2j5 { rank 2 or higher
>
>    (<+.2j5){ i.3#9   NB. -: 2j5 { i.3#9
> 207 208 209 210 211 212 213 214 215
>
> I haven't considered amend or fetch, although the idea seems applicable.
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to