Skip to content

Conversation

gambiteer
Copy link

This makes the documentation match the implementation and the last example. (It may be obvious that this is what it should do, but it confused me for a while.)

This makes the documentation match the implementation and the last example.
@pavpanchekha
Copy link
Collaborator

Uhh, looking at the suggested change I'm not sure what the new change means? You mean they're not broadcast along k?

@gambiteer
Copy link
Author

Right, you have

heine:~/lang/scheme/srfi-231/srfi-231> /usr/local/racket/bin/racket
Welcome to Racket v8.16.0.2 [cs].
> (require math/array)
> (array-append* (list (array #[#[0 1] #[2 3]]) (array #['a])) 0)
(array #[#[0 1] #[2 3] #['a 'a]])
> (array-append* (list (array #[#[0 1] #[2 3]]) (array #['a])) 1)
(array #[#[0 1 'a] #[2 3 'a]])

See also

(define (array-broadcast-for-append arrs k)
where you have a separate broadcast routine for append that deletes the kth axis before applying broadcasting and reinserts it after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants