[m-rev.] (no subject)

Julien Fischer jfischer at opturion.com
Sun Oct 4 23:59:10 AEDT 2020


On Sun, 4 Oct 2020, Zoltan Somogyi wrote:

> For review by anyone.

> Modernize library/array2d.m.
> 
> library/array2d.m:
>     Add lookup and unsafe_lookup, in both function and predicate forms,
>     as alternatives to rafe's ^elem notation.
>
>     Use meaningful variable names in both code and documentation.
>     For example, use NumRows and NumColumns instead of M and N.
>
>     Replace the implementation of the function that converts a 2d array
>     back to lists. The new implementation has one loop over rows and one
>     loop over columns, while the old one had a single loop that did
>     both jobs. The new one returns [] (meaning no rows) for a 0x0 array,
>     while the old returned [[]] (meaning one row with no columns).
> 
> NEWS:
>     Announce the changes.
> 
> tests/hard_coded/test_array2d.m:
>     Use a lookup instead of ^elem.
> 
> tests/hard_coded/test_array2d.exp:
>     Expect the updated output from lists. Expect any exceptions to come
>     from lookup functions, not ^elem functions (since the latter now
>     just call the former).


That looks fine.

Julien.


More information about the reviews mailing list