guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: propose deprecation of generalized-vector-*


From: Peter TB Brett
Subject: Re: propose deprecation of generalized-vector-*
Date: Wed, 19 Sep 2012 13:02:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Daniel Llorens <address@hidden> 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 <address@hidden>
Remote Sensing Research Group
Surrey Space Centre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]