Following up on SRFI 179 Bradley Lucier (22 Sep 2021 22:30 UTC)
Re: Following up on SRFI 179 John Cowan (24 Sep 2021 19:24 UTC)
Re: Following up on SRFI 179 Alex Shinn (25 Sep 2021 13:24 UTC)
Re: Following up on SRFI 179 Bradley Lucier (25 Sep 2021 16:43 UTC)
Re: Following up on SRFI 179 Alex Shinn (28 Sep 2021 07:36 UTC)
Re: Following up on SRFI 179 Bradley Lucier (28 Sep 2021 20:20 UTC)
Re: Following up on SRFI 179 Bradley Lucier (28 Sep 2021 20:30 UTC)
Re: Following up on SRFI 179 Bradley Lucier (01 Oct 2021 00:07 UTC)
Re: Following up on SRFI 179 Alex Shinn (01 Oct 2021 00:43 UTC)
Re: Following up on SRFI 179 Lucier, Bradley J (05 Oct 2021 01:04 UTC)
Re: Following up on SRFI 179 John Cowan (06 Oct 2021 01:26 UTC)
Re: Following up on SRFI 179 Lucier, Bradley J (06 Oct 2021 13:48 UTC)
Re: Following up on SRFI 179 Bradley Lucier (05 Oct 2021 19:54 UTC)
array-{append|stack|inner-product} Bradley Lucier (21 Oct 2021 15:52 UTC)

array-{append|stack|inner-product} Bradley Lucier 21 Oct 2021 15:52 UTC

On 9/24/21 3:24 PM, John Cowan wrote:
> 3) (array-append k a1 a2 ...) concatenates its array arguments along the
> kth dimension.  The arrays must have the same number of dimensions and
> all but the kth dimension must be equal.  The result has an interval
> where each dimension except k is copied from the input arrays and the
> kth dimension is the sum of the kth dimensions of the input arrays
> adjusted to a lower bound of 0.  So given a 3 x 3 array and a 3 x 4
> array, these can be concatenated along the column dimension giving a 3 x
> 7 array, but it is an error to concatenate them along the row dimension.
>
> 4) (array-laminate k a1 a2 ...) creates a new dimension between k = 1
> and k (a new first dimension if k = -1).  The arrays must have the same
> interval.  The new dimension's upper bound is the number of array
> arguments, and each array argument is used to fill one of the elements
> of the dimension.  Thus laminating two 3 x 3 arrays gives 2 x 3 x 3, 3 x
> 2 x 3, or 3 x 3 x 2 results depending on k = -1, 0, 1.
>
> 5) Put inner product into the spec rather than the examples.  It is an
> error if both array arguments are one-dimensional.  (Avoiding this wart
> is the reason for supporting 0-dimensional arrays in CL, I think.)

I've specified, coded, documented, and tested these routines at

https://github.com/gambiteer/srfi-179-followup/

I'd be happier if there were more varied tests of array-{append|stack},
but for now it's OK.

I left the default safety and mutability as parameters, and added them
as optional arguments to array-{stack|append}.

I think I've addressed all comments in this thread and all comments that
came up previously.

I don't want to have a fourth version of this SRFI, so I'm going to let
things sit for a bit before submitting this followup to SRFI 179.

Brad