Skip to content

Commit 9c8b13d

Browse files
committed
fixup! Add rand! implementation
1 parent 2e2c60d commit 9c8b13d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/array/random.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Random.rand!(dm::DArray{T}) where T = map!(_ -> rand(T), dm)
22
Random.randn!(dm::DArray{T}) where T = map!(_ -> randn(T), dm)
33

44
randfork(rng::R, n::Integer) where {R<:AbstractRNG} =
5-
R(rand(copy(rng), Int) + n)
5+
R(abs(rand(copy(rng), Int) + n))
66

77
function Random.rand!(rng::AbstractRNG, A::DArray{T}) where T
88
part_sz = prod(map(length, first(A.subdomains).indexes))

0 commit comments

Comments
 (0)