Daniel Llorens <daniel.llor...@bluewin.ch> writes:

> The only generalized-vector-? function that doesn't have a direct
> array-? correspondence is generalized-vector-length. However, even for
> arrays of rank > 1 it is often convenient to have a function such as
>
> (array-length a) = (car (array-dimensions a))
>
> or maybe
>
> (array-length a) = (fold * 1 (array-dimensions a))
>
> Personally I'd favor the first as there's nothing to compute, but
> either would work to replace generalized-vector-length.

It seems to me that array-length should return the first non-unity
dimension. This is the approach taken by e.g. MATLAB's length()
function. It would give it a distinct utility compared to
array-dimensions (which is analogous to MATLAB's size() function).

WDYT?

                        Peter

-- 
Peter Brett <pe...@peter-b.co.uk>
Remote Sensing Research Group
Surrey Space Centre


Reply via email to