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
Example code copied from README not working (julia-1.3.0, Calculus-0.5.1):
julia>using Calculus
julia>f(x) =sin(x)
f (generic function with 1 method)
julia> f'(1.0) -cos(1.0)
ERROR: MethodError: no method matching adjoint(::typeof(f))
Closest candidates are:adjoint(::Missing) at missing.jl:100adjoint(::Number) at number.jl:193adjoint(::LinearAlgebra.Adjoint) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\LinearAlgebra\src\adjtrans.jl:152...
Stacktrace:
[1] top-level scope at REPL[3]:1
julia> f''(1.0) - (-sin(1.0))
ERROR: MethodError: no method matching adjoint(::typeof(f))
Closest candidates are:adjoint(::Missing) at missing.jl:100adjoint(::Number) at number.jl:193adjoint(::LinearAlgebra.Adjoint) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\LinearAlgebra\src\adjtrans.jl:152...
Stacktrace:
[1] top-level scope at REPL[6]:1
The text was updated successfully, but these errors were encountered:
I'm having the same problem with JuliaPro-1.2.0-2 with Julia 1.2.0 on macOS 10.15.1.
Steps:
Start JuliaPro
Start Julia REPL
Enter `Pkg.add("Calculus")
Enter using Calculus
Enter f(x) = x
Enter f'(0)
REPL errors: ERROR: MethodError: no method matching adjoint(::typeof(f))
It appears as though Julia is mistaking the Calculus package's prime notation operator for the Hermitian adjoint operator in the standard library. julia/stdlib/v1.2/LinearAlgebra/adjtrans.jl specifically mentions:
Lazy adjoint (conjugate transposition) (also postfix `'`).
Note that `adjoint` is applied recursively to elements.
Example code copied from README not working (julia-1.3.0, Calculus-0.5.1):
The text was updated successfully, but these errors were encountered: