Skip to content

logabsgamma doesn't work with ForwardDiff #49

@Moelf

Description

@Moelf
ERROR: MethodError: no method matching _logabsgamma(::ForwardDiff.Dual{ForwardDiff.Tag{Optim.var"#135#136"{LiteHF.var"#54#55"{LiteHF.var"#52#53"{Tuple{LiteHF.FlatPrior{Int64}, Distributions.Normal{Float64}, Distributions.Normal{Float64}, LiteHF.RelaxedPoisson{Float64}, LiteHF.RelaxedPoisson{Float64}}}, LiteHF.var"#45#48"{LiteHF.var"#27#35"{Tuple{LiteHF.var"#40#44"{Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, Tuple{ExpCounts{}
, ExpCounts{}
, ExpCounts{}
}}}}, Tuple{JSON3.Array{Int64, Vector{UInt8}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}}}, LiteHF.var"#f#47"}}}, Float64}, Float64, 5})
Closest candidates are:
  _logabsgamma(::Float64) at ~/.julia/packages/SpecialFunctions/CQMHW/src/gamma.jl:601
  _logabsgamma(::Float32) at ~/.julia/packages/SpecialFunctions/CQMHW/src/gamma.jl:606
  _logabsgamma(::Float16) at ~/.julia/packages/SpecialFunctions/CQMHW/src/gamma.jl:611
  ...
Stacktrace:
  [1] logabsgamma(x::ForwardDiff.Dual{ForwardDiff.Tag{Optim.var"#135#136"{LiteHF.var"#54#55"{LiteHF.var"#52#53"{Tuple{LiteHF.FlatPrior{Int64}, Distributions.Normal{Float64}, Distributions.Normal{Float64}, LiteHF.RelaxedPoisson{Float64}, LiteHF.RelaxedPoisson{Float64}}}, LiteHF.var"#45#48"{LiteHF.var"#27#35"{Tuple{LiteHF.var"#40#44"{Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, Tuple{ExpCounts{}
, ExpCounts{}
, ExpCounts{}
}}}}, Tuple{JSON3.Array{Int64, Vector{UInt8}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}}}, LiteHF.var"#f#47"}}}, Float64}, Float64, 5})
    @ SpecialFunctions ~/.julia/packages/SpecialFunctions/CQMHW/src/gamma.jl:599

should this be raised in SpecialFunctions instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions