Skip to content

Commit

Permalink
Merge pull request #30477 from raghav9-97/repeat
Browse files Browse the repository at this point in the history
Tests for repeat with 0-dimensional Array
  • Loading branch information
vchuravy committed Dec 21, 2018
2 parents 3648f4c + e5b5a01 commit f503e80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/arrayops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,10 @@ end
@test_throws MethodError repeat(1, 2, 3)
@test repeat([1, 2], 1, 2, 3) == repeat([1, 2], outer = (1, 2, 3))

# issue 29020
@test repeat(collect(5), outer=(2, 2)) == [5 5;5 5]
@test repeat(ones(Int64), inner=(1,2), outer=(2,2)) == [1 1 1 1;1 1 1 1]

# issue 29614
@test repeat(ones(2, 2), 1, 1, 1) == ones(2, 2, 1)
@test repeat(ones(2, 2), 2, 2, 2) == ones(4, 4, 2)
Expand Down

0 comments on commit f503e80

Please sign in to comment.