Skip to content

Commit 7f1b12f

Browse files
authored
Update src/rng.jl
1 parent 4f8ec74 commit 7f1b12f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rng.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ Base.rand(rng::TracedRNG, ::Type{T}) where {T} = Base.rand(rng.rng, T)
3434
Split `key` into `n` new keys
3535
"""
3636
function split(key::Integer, n::Integer=1)
37-
return [hash(key, i) for i in UInt(1):UInt(n)]
37+
T = typeof(key) # Make sure the type of `key` is consistent on W32 and W64 systems.
38+
return T[hash(key, i) for i in UInt(1):UInt(n)]
3839
end
3940

4041
"""

0 commit comments

Comments
 (0)