Skip to content

Commit 358f75f

Browse files
committed
Make rng_from_array non differentiable
1 parent 0cbab9e commit 358f75f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/utils.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ The current defaults are:
4646
rng_from_array(::AbstractArray) = default_rng_value()
4747
rng_from_array(::CuArray) = CUDA.default_rng()
4848

49+
@non_differentiable rng_from_array(::Any)
50+
4951
if VERSION >= v"1.7"
5052
@doc """
5153
default_rng_value()

0 commit comments

Comments
 (0)