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

Assume unknown functions are non-linear in hessian_sparsity #1384

Merged
merged 5 commits into from
Dec 13, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Add test for #749
  • Loading branch information
devmotion committed Dec 12, 2024
commit 3185d301e6cf487e298c17a336baf0df3d6fdb14
10 changes: 10 additions & 0 deletions test/diff.jl
Original file line number Diff line number Diff line change
@@ -510,3 +510,13 @@ let
@test Symbolics.isaffine(expr, w)
@test collect(Symbolics.hessian_sparsity(expr, w)) == fill(false, 2, 2)
end

# issue #749
let
@variables x y
@register_symbolic Base.FastMath.exp_fast(x, y)
expr = Base.FastMath.exp_fast(x, y)
@test !Symbolics.islinear(expr, [x, y])
@test !Symbolics.isaffine(expr, [x, y])
@test collect(Symbolics.hessian_sparsity(expr, [x, y])) == fill(true, 2, 2)
end
Loading