Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix deprecation warning #462

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.0"

[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
Loading