Skip to content

Commit

Permalink
Merge pull request #462 from ArnoStrouwen/dep
Browse files Browse the repository at this point in the history
fix deprecation warning
  • Loading branch information
ChrisRackauckas authored Jan 19, 2024
2 parents e6eff59 + d1c7321 commit 60a9902
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ authors = ["SciML"]
version = "6.9.1"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
ExtendableSparse = "95c220a8-a1cf-11e9-0c77-dbfce5f500b3"
GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a"
Expand All @@ -16,6 +17,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
Aqua = "0.8"
ChainRulesCore = "1.19.1"
Cubature = "1.5"
Distributions = "0.25.71"
ExtendableSparse = "1"
Expand All @@ -24,8 +26,8 @@ ForwardDiff = "0.10.19"
GLM = "1.5"
IterativeSolvers = "0.9"
LinearAlgebra = "1.10"
PolyChaos = "0.2.5"
Pkg = "1"
PolyChaos = "0.2.5"
QuadGK = "2.4"
QuasiMonteCarlo = "0.3.1"
SafeTestsets = "0.1"
Expand Down
7 changes: 4 additions & 3 deletions src/Radials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ function _construct_rbf_y_matrix(y, y_el, m)
[i <= length(y) ? y[i][j] : zero(first(y_el)) for i in 1:m, j in 1:length(y_el)]
end

using Zygote: @nograd, Buffer
using Zygote: Buffer
using ChainRulesCore: @non_differentiable

function _make_combination(n, d, ix)
exponents_combinations = [e
Expand All @@ -118,8 +119,8 @@ function _make_combination(n, d, ix)
return exponents_combinations[ix + 1]
end
# TODO: Is this correct? Do we ever want to differentiate w.r.t n, d, or ix?
# By using @nograd we force the gradient to be 1 for n, d, ix
@nograd _make_combination
# By using @non_differentiable we force the gradient to be 1 for n, d, ix
@non_differentiable _make_combination(n, d, ix)

"""
multivar_poly_basis(x, ix, d, n)
Expand Down

0 comments on commit 60a9902

Please sign in to comment.