Numpy's array manipulation routines compared to this SRFI. Bradley Lucier (25 Feb 2022 20:17 UTC)
Re: Numpy's array manipulation routines compared to this SRFI. Bradley Lucier (30 Aug 2024 00:15 UTC)

Re: Numpy's array manipulation routines compared to this SRFI. Bradley Lucier 30 Aug 2024 00:15 UTC

On 8/29/24 9:49 AM, Alex Shinn wrote:
> Sorry, I don't follow how you derive broadcasting from array-lift.
> It seems to handle padding leading missing dimensions, but not
> repeating aligned dimensions of trivial width.

What I meant is that NumPy uses two different notational conventions to
indicate where to put extended axes: If the dimensions are not equal,
add new ones to the left; and wherever the width of an axis of one
argument is 1, extend that axis to match the width of the the
corresponding axis of the other argument.  (This rule works, even if the
width of corresponding axes are both 1.)

With the addition of array-fill, one could use the definition of
array-squeeze given as an example in the SRFI document, together with
array-permute, to get the same results as the NumPy array broadcast.

array-broadcast might be a much better notational way to specify those
results, but the results are the same.  The only missing piece is
array-fill.

Brad