Page 1 of 1

Still getting caught by APL?

PostPosted: August 28th, 2018, 3:24 pm
by Ajay Askoolum
I guess most APL developers get caught by scalars having rank 0 and/or rank 1, occasionally.

I needed to verify that an argument, a nested vector, to a function contained 1. arrays of rank 2, had the same number of rows and 3. were simple arrays i.e. had depth 1.

I spent ages figuring out why
Code: Select all
was returning (seemed like) the number of elements in the argument and not the rank of each element. Somehow, I had always assumed that ⍴⍴ was a composite symbol like ∘. What I needed was, of course:
. Embarrassing!