Skip to content

Commit

Permalink
Don't pre-filter empty arrays in array-append.
Browse files Browse the repository at this point in the history
Closes #977.
  • Loading branch information
ashinn committed May 28, 2024
1 parent 11984c6 commit 78a990c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/srfi/231/test.sld
Original file line number Diff line number Diff line change
Expand Up @@ -3335,6 +3335,12 @@
(make-interval (quote #(1 -6 -1 3))
(quote #(5 -5 5 8)))
'(3 1 6 2 8 0 8 1 2 6 7 2 9 4 6 5 2 4 5 4 5 2 6 6 0 6 4 2 1 3 4 6 9 6 7 2 4 8 4 3 5 5 8 0 6 4 6 3 7 6 3 4 1 6 2 3 1 9 1 0 3 1 5 0 3 5 8 1 8 0 2 3 1 5 0 4 9 5 3 2 0 7 6 5 5 9 4 8 5 3 2 5 1 4 8 4 5 7 4 6 1 5 8 2 0 1 5 0 8 3 0 4 6 1 7 1 7 1 6 9)))))
(test-assert
(array-append
0
(list
(make-array (make-interval '#(0)) list)
(make-array (make-interval '#(0)) list))))
)

'(test-group "assign/product"
Expand Down
3 changes: 1 addition & 2 deletions lib/srfi/231/transforms.scm
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,7 @@
(pair? arrays)
(every array? arrays)
(< -1 axis (array-dimension (car arrays)))))
(let* ((arrays (remove array-empty? arrays))
(a (car arrays))
(let* ((a (car arrays))
(a-domain (array-domain a))
(storage (if (pair? o) (car o) generic-storage-class))
(mutable? (if (and (pair? o) (pair? (cdr o)))
Expand Down

0 comments on commit 78a990c

Please sign in to comment.