Skip to content

Commit

Permalink
remove superfluous rand dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
tiemvanderdeure committed Nov 28, 2024
1 parent 987e040 commit 4165135
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/stack/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,4 @@ for fname in (:one, :oneunit, :zero, :copy)
end
end

Base.reverse(s::AbstractDimStack; dims=:) = maplayers(A -> reverse(A; dims=dims), s)

# Random
Random.Sampler(RNG::Type{<:AbstractRNG}, st::AbstractDimStack, n::Random.Repetition) =
Random.SamplerSimple(st, Random.Sampler(RNG, DimIndices(st), n))

Random.rand(rng::AbstractRNG, sp::Random.SamplerSimple{<:AbstractDimStack,<:Random.Sampler}) =
@inbounds return sp[][rand(rng, sp.data)...]
Base.reverse(s::AbstractDimStack; dims=:) = maplayers(A -> reverse(A; dims=dims), s)

0 comments on commit 4165135

Please sign in to comment.