Skip to content

Commit

Permalink
fix: fix NaNMath.pow(::Num, ::Integer) ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Jan 10, 2025
1 parent 1ea3df5 commit 4cdb222
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Symbolics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ import SymbolicLimits

using ADTypes: ADTypes

using NaNMath

@reexport using SymbolicUtils
RuntimeGeneratedFunctions.init(@__MODULE__)

Expand Down Expand Up @@ -108,7 +110,7 @@ include("variable.jl")
function slog end; function ssqrt end; function scbrt end
include("linearity.jl")

using DiffRules, SpecialFunctions, NaNMath
using DiffRules, SpecialFunctions

using SparseArrays

Expand Down
2 changes: 2 additions & 0 deletions src/num.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ SymbolicUtils.@number_methods(
Num(f(value(a), value(b))),
[conj, real, transpose]
)

NaNMath.pow(x::Num, y::Integer) = wrap(NaNMath.pow(unwrap(x), y))
Base.conj(x::Num) = x
Base.transpose(x::Num) = x

Expand Down

0 comments on commit 4cdb222

Please sign in to comment.