You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, if Calculus is used before calling gradient, you get
julia>using Calculus
julia>gradient([1:3;])
ERROR: MethodError:gradient(::Array{Int64,1}, ::Array{Int64,1}) is ambiguous. Candidates:gradient(f, x::Union{Array{T,1}, T}) where T<:Numberin Calculus at /home/david/.julia/v0.6/Calculus/src/derivative.jl:17gradient(F::AbstractArray{T,1}where T, h::Array{T,1}where T) in Base.LinAlg at linalg/dense.jl:186
Possible fix, define
gradient(::AbstractArray{T,1}where T, ::Array{T<:Number,1})
Stacktrace:
[1] gradient(::Array{Int64,1}) at ./linalg/generic.jl:282
Even directly calling the function from base with Base.LinAlg.gradient throws the above error.
I am using v"0.3.1", but this also happens when pinning to v"0.3.0". Older version fail to pre-compile with Julia 0.6.2.
The text was updated successfully, but these errors were encountered:
Since a recent update, there seems to be a problem with the
gradient
fucntion.The following works fine:
However, if
Calculus
is used before callinggradient
, you getEven directly calling the function from base with
Base.LinAlg.gradient
throws the above error.I am using v"0.3.1", but this also happens when pinning to v"0.3.0". Older version fail to pre-compile with Julia 0.6.2.
The text was updated successfully, but these errors were encountered: