I have updated to the latest version of package NeuralPDE and used the res = Optimization.solve(prob,OptimizationOptimJL.BFGS(); callback = callback, maxiters = 1500) to solve the ODE system on Jupyter notebook. I got the message:
MethodError: no method matching cos(::Matrix{Float64})
You may have intended to import Base.cos
This issue did not occur when I used the older version (I forgot the exact version that I used before the update).
How could I fix this error?
But before I update all packages and Julia version 1.9.2, this error did not occur. Actually, I use the cos and sin function for variables in the ODE problem and use NeuralPDE to solve it.
MethodError: no method matching cos(::Matrix{Float64})
You may have intended to import Base.cos
Closest candidates are:
cos(::ForwardDiff.Dual{T}) where T
@ ForwardDiff C:\Users\htran\.julia\packages\ForwardDiff\vXysl\src\dual.jl:238
cos(::DualNumbers.Dual)
@ DualNumbers C:\Users\htran\.julia\packages\DualNumbers\5knFX\src\dual.jl:327
cos(::Float64)
@ NaNMath C:\Users\htran\.julia\packages\NaNMath\ceWIc\src\NaNMath.jl:9
...MethodError: no method matching cos(::Matrix{Float64})
You may have intended to import Base.cos
Closest candidates are:
cos(::ForwardDiff.Dual{T}) where T
@ ForwardDiff C:\Users\htran\.julia\packages\ForwardDiff\vXysl\src\dual.jl:238
cos(::DualNumbers.Dual)
@ DualNumbers C:\Users\htran\.julia\packages\DualNumbers\5knFX\src\dual.jl:327
cos(::Float64)
@ NaNMath C:\Users\htran\.julia\packages\NaNMath\ceWIc\src\NaNMath.jl:9
...