Sympy not found in current path but it´s installed - visual-studio-code

I had been working all afternoon with Julia when suddenly SymPy stopped working. It tells me that I should add SYMPA but SymPy is already there. The weirdest thing of all is this only happens inside of Visual Studio Code, as the Julia program can perfectly run SymPy. This is the error that pops up whenever I try to run using SymPy in VSC
ERROR: ArgumentError: Package Sympy not found in current path.
- Run `import Pkg; Pkg.add("Sympy")` to install the Sympy package.
Stacktrace:
[1] macro expansion
# .\loading.jl:1163 [inlined]
[2] macro expansion
# .\lock.jl:223 [inlined]
[3] require(into::Module, mod::Symbol)
# Base .\loading.jl:1144
[4] eval
# .\boot.jl:368 [inlined]
[5] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
# Base .\loading.jl:1428
[6] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
# Base .\essentials.jl:729
[7] invokelatest(::Any, ::Any, ::Vararg{Any})
# Base .\essentials.jl:726
[8] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:233
[9] (::VSCodeServer.var"#66#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:157
[10] withpath(f::VSCodeServer.var"#66#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\repl.jl:249
[11] (::VSCodeServer.var"#65#69"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:155
[12] hideprompt(f::VSCodeServer.var"#65#69"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\repl.jl:38
[13] (::VSCodeServer.var"#64#68"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:126
[14] with_logstate(f::Function, logstate::Any)
# Base.CoreLogging .\logging.jl:511
[15] with_logger
# .\logging.jl:623 [inlined]
[16] (::VSCodeServer.var"#63#67"{VSCodeServer.ReplRunCodeRequestParams})()
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:225
[17] #invokelatest#2
# .\essentials.jl:729 [inlined]
[18] invokelatest(::Any)
# Base .\essentials.jl:726
[19] macro expansion
# c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined]
[20] (::VSCodeServer.var"#61#62")()
# VSCodeServer .\task.jl:484

This sounds like a problem with the environment you are using. What is it saying in the bottom left of VSCode about the environment?
If it says there something like "Julia 1.8.3", you are using the overall installation. I could imagine that this is not the case.
In every folder you can create a specific environment. Go into the package mode by typing ] in the REPL. Then activate the "folder" environment like this
(#v1.8) pkg> activate .
and your prompt will change to
(your_folder) pkg>
This is strongly encouraged by the way.
You can then in the package mode (]) see the installed packages (st) and add (add [package]) and remove some ( rm [package]) as well.

Related

Convert Int64 array to Int8 in Julia gives InexactError: trunc(Int8, -9223372036854775808)

I try to convert a part of an julia df from Int64 to Int8.
input:
array = convert(Array{Int8} , array );
output:
InexactError: trunc(Int8, -9223372036854775808)
Stacktrace:
[1] throw_inexacterror(f::Symbol, #unused#::Type{Int8}, val::Int64)
# Core ./boot.jl:612
[2] checked_trunc_sint
# ./boot.jl:634 [inlined]
[3] toInt8
# ./boot.jl:649 [inlined]
[4] Int8
# ./boot.jl:759 [inlined]
[5] convert
# ./number.jl:7 [inlined]
[6] setindex!
# ./array.jl:903 [inlined]
[7] _unsafe_copyto!(dest::Vector{Int8}, doffs::Int64, src::Vector{Int64}, soffs::Int64, n::Int64)
# Base ./array.jl:253
[8] unsafe_copyto!
# ./array.jl:307 [inlined]
[9] _copyto_impl!
# ./array.jl:331 [inlined]
[10] copyto!
# ./array.jl:317 [inlined]
[11] copyto!
# ./array.jl:343 [inlined]
[12] copyto_axcheck!
# ./abstractarray.jl:1104 [inlined]
[13] Vector{Int8}(x::Vector{Int64})
# Base ./array.jl:563
[14] Array
# ./boot.jl:482 [inlined]
[15] convert(#unused#::Type{Array{Int8}}, a::Vector{Int64})
# Base ./array.jl:554
[16] top-level scope
# In[62]:1
[17] eval
# ./boot.jl:373 [inlined]
[18] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
# Base ./loading.jl:1196
Also:
Input:
maximum(array)
output:
11
So the bigges value of this is under 255 which is the max size of Int8.
thanks,
Bene
While the maximum value in your data is 11, the minimum value in your data is -9223372036854775808, also known as typemin(Int64), which cannot be converted to Int8 since that type can only represent values from -128 to 127.
Sometimes the typemin value in the array is used to indicate a null value or a missing value. This isn't the best practice in Julia, but it's possible your data source is using the value this way.
Say you have an array arr:
julia> arr = [1, 2, typemin(Int), 4]
4-element Vector{Int64}:
1
2
-9223372036854775808
4
If the typemin value is supposed to indicate missing data, you can do:
julia> [n == typemin(Int) ? missing : Int8(n) for n in arr]
4-element Vector{Union{Missing, Int8}}:
1
2
missing
4
Or if it's supposed to indicate null/invalid data, you can use nothing instead of missing above.

EXCEPTION_ACCESS_VIOLATION at 0x0 when calling dll compiled with Julia PackageCompiler

I am compiling Julia program as dll and trying to call from another program.
The Julia program is as follows (I am planning to use commented out pkg):
module pjname
# using Statistics
# using CSV
# using DataFrames
# using DSP
# # using Plots
# using Dates
# using FindPeaks1D
Base.#ccallable function function_name(slen::Cint)::Cint
println(1)
return 0
end
end # module
The program I am using to compile the code is:
using PackageCompiler
PackageCompiler.create_sysimage(; sysimage_path="./src/prog_dl.dll", script="./src/prog.jl")
and the program I call the dll is as follows:
using Libdl
libmg = dlopen("H:/julia/pjname3/src/prog_dl.dll")
function_name = dlsym(libmg, :func_name)
ccall(function_name, Cint, (Cint,), Int32(1))
I get the following error. Could someone help me to figure out this issue? I tried Julia version 1.6.5 and 1.7.0 but both of them didn't work. I am using windows and VS Code as IDE.
Please submit a bug report with steps to reproduce this fault, and any
error messages that follow (in their entirety). Thanks. Exception:
EXCEPTION_ACCESS_VIOLATION at 0x0 -- unknown function (ip:
0000000000000000) in expression starting at none:1 unknown
function (ip: 0000000000000000) function_name at
H:\julia\pjname3\src\prog_dl.dll (unknown line) top-level scope at
.\none:1 jl_toplevel_eval_flex at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:871
jl_toplevel_eval at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:886
[inlined] jl_toplevel_eval_in at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:929
eval at .\boot.jl:360 [inlined] evaluate_foreigncall at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\interpret.jl:166
eval_rhs at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\interpret.jl:402
step_expr! at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\interpret.jl:556
step_expr! at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\interpret.jl:611
finish! at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\commands.jl:14
finish_and_return! at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\commands.jl:30
unknown function (ip: 0000000060da89d5) finish_stack! at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\commands.jl:60
unknown function (ip: 0000000060da8925)
#debug_command#83 at c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\commands.jl:474
debug_command at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\commands.jl:416
unknown function (ip: 0000000060dc8a09) jl_apply at
/cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703
[inlined] jl_f__call_latest at
/cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:714
#invokelatest#2 at .\essentials.jl:708 [inlined] invokelatest at .\essentials.jl:706 [inlined] our_debug_command at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\DebugAdapter\src\debugger_core.jl:67
startdebug at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\DebugAdapter\src\packagedef.jl:106
startdebugger at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\VSCodeDebugger\src\VSCodeDebugger.jl:39
unknown function (ip: 0000000060d6bca3) jl_apply at
/cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703
[inlined] do_call at
/cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:115
eval_value at
/cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:204
eval_stmt_value at
/cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:155
[inlined] eval_body at
/cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:576
jl_interpret_toplevel_thunk at
/cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:670
jl_toplevel_eval_flex at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:877
jl_toplevel_eval_flex at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:825
jl_toplevel_eval at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:886
[inlined] jl_toplevel_eval_in at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:929
eval at .\boot.jl:360 [inlined] include_string at .\loading.jl:1116
_include at .\loading.jl:1170 include at .\Base.jl:384 exec_options at .\client.jl:285
_start at .\client.jl:485 jfptr__start_46900.clone_1 at C:\Users\user_name\AppData\Local\Programs\Julia-1.6.5\lib\julia\sys.dll
(unknown line) jl_apply at
/cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703
[inlined] true_main at
/cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:560
repl_entrypoint at
/cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:702
mainCRTStartup at
/cygdrive/c/buildbot/worker/package_win64/build/cli\loader_exe.c:51
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
Allocations: 14028713 (Pool: 14021110; Big: 7603); GC: 16 The terminal
process
"C:\Users\user_name\AppData\Local\Programs\Julia-1.6.5\bin\julia.exe
'--color=yes', '--startup-file=no', '--history-file=no',
'--project=h:\julia\pjname3',
'c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\debugger\run_debugger.jl',
'\.\pipe\vsc-jl-dbg-7bbf4da0-9e5b-4d64-8fbb-db76fd01a2af',
'\.\pipe\vsc-jl-cr-e192e8b6-1dd8-46c2-90a6-1074d122bd3c'" terminated
with exit code: 1.

How do I implement the termination of an ODE solution based on an event in Julia? Why am I getting a BoundsError?

I am trying to solve a coupled ODE using the DifferentialEquations package in Julia, and trying to implement a Continuous Callback to check when a certain variable becomes small enough, so I can terminate the integration. The functions xdot, ddot are defined earlier, and this is working fine without the cb = callback argument.
function w(x,d)
retval = p(x,d)./rho(x,d)
if isnan(retval)
return 0.0
end
return retval
end
function wsys!(dv,v,p,t)
x,d = v
dv[1] = xdot(x,d)
dv[2] = ddot(x,d)
end
function w_enough(t,v,integrator)
w(v[1],v[2]) - 0.0001
end
cb = ContinuousCallback(w_enough,terminate!)
init = [xi,di]
tspan = (0,log(1e4))
prob = ODEProblem(wsys!,init,tspan)
sol = solve(prob,callback=cb);
When I run the last line, I get the error:
BoundsError
Stacktrace:
[1] getindex at .\number.jl:78 [inlined]
[2] w_enough(::Array{Float64,1}, ::Float64, ::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},true,Array{Float64,1},Float64,DiffEqBase.NullParameters,Float64,Float64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward},Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}}},DiffEqBase.DEStats},ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward},Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing}},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64,Nothing}) at .\In[15]:8
[3] find_callback_time(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},true,Array{Float64,1},Float64,DiffEqBase.NullParameters,Float64,Float64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward},Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}}},DiffEqBase.DEStats},ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward},Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing}},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64,Nothing}, ::ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing}, ::Int64) at C:\Users\hganj\.julia\packages\DiffEqBase\mDFok\src\callbacks.jl:498
[4] find_first_continuous_callback at C:\Users\hganj\.julia\packages\DiffEqBase\mDFok\src\callbacks.jl:383 [inlined]
[5] handle_callbacks!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},true,Array{Float64,1},Float64,DiffEqBase.NullParameters,Float64,Float64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward},Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}}},DiffEqBase.DEStats},ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward},Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing}},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64,Nothing}) at C:\Users\hganj\.julia\packages\OrdinaryDiffEq\8Pn99\src\integrators\integrator_utils.jl:247
[6] _loopfooter!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},true,Array{Float64,1},Float64,DiffEqBase.NullParameters,Float64,Float64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward},Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}}},DiffEqBase.DEStats},ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward},Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing}},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64,Nothing}) at C:\Users\hganj\.julia\packages\OrdinaryDiffEq\8Pn99\src\integrators\integrator_utils.jl:202
[7] loopfooter! at C:\Users\hganj\.julia\packages\OrdinaryDiffEq\8Pn99\src\integrators\integrator_utils.jl:166 [inlined]
[8] solve!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},true,Array{Float64,1},Float64,DiffEqBase.NullParameters,Float64,Float64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward},Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}}},DiffEqBase.DEStats},ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23Tableau{Float64},DiffEqBase.TimeGradientWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,1},DiffEqBase.NullParameters},DiffEqBase.UJacobianWrapper{ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,DiffEqBase.NullParameters},DefaultLinSolve,FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:forward},Float64},FiniteDiff.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing}},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64,Nothing}) at C:\Users\hganj\.julia\packages\OrdinaryDiffEq\8Pn99\src\solve.jl:403
[9] #__solve#328(::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:default_set, :second_time, :callback),Tuple{Bool,Bool,ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing}}}}, ::typeof(DiffEqBase.__solve), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}}) at C:\Users\hganj\.julia\packages\OrdinaryDiffEq\8Pn99\src\solve.jl:5
[10] (::DiffEqBase.var"#kw##__solve")(::NamedTuple{(:default_set, :second_time, :callback),Tuple{Bool,Bool,ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing}}}, ::typeof(DiffEqBase.__solve), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Int64}}) at .\none:0
[11] #__solve#1(::Bool, ::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:second_time, :callback),Tuple{Bool,ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing}}}}, ::typeof(DiffEqBase.__solve), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}, ::Nothing) at C:\Users\hganj\.julia\packages\DifferentialEquations\hc2aQ\src\default_solve.jl:7
[12] #__solve at .\none:0 [inlined]
[13] #__solve#448 at C:\Users\hganj\.julia\packages\DiffEqBase\mDFok\src\solve.jl:185 [inlined]
[14] #__solve at .\none:0 [inlined]
[15] #solve_call#443(::Bool, ::Base.Iterators.Pairs{Symbol,ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing},Tuple{Symbol},NamedTuple{(:callback,),Tuple{ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing}}}}, ::typeof(DiffEqBase.solve_call), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}) at C:\Users\hganj\.julia\packages\DiffEqBase\mDFok\src\solve.jl:44
[16] #solve_call at .\none:0 [inlined]
[17] #solve#444 at C:\Users\hganj\.julia\packages\DiffEqBase\mDFok\src\solve.jl:67 [inlined]
[18] (::DiffEqBase.var"#kw##solve")(::NamedTuple{(:callback,),Tuple{ContinuousCallback{typeof(w_enough),typeof(affect!),typeof(affect!),typeof(DiffEqBase.INITIALIZE_DEFAULT),Float64,Int64,Nothing}}}, ::typeof(solve), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,ODEFunction{true,typeof(wsys!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}) at .\none:0
[19] top-level scope at In[21]:1
Terminating at this event is important to this code, and I'm new to Julia. I'd really appreciate any help!
function w_enough(t,v,integrator)
w(v[1],v[2]) - 0.0001
end
is the incorrect argument ordering, the function as documented should be:
function w_enough(v,t,integrator)
w(v[1],v[2]) - 0.0001
end

Need modification to existing multiline Perl replacement code [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I had a recent question earlier this month which was solved by #jm666 which involved multi line text replacement.
I have an issue in that, although this works perfectly as requested, it results in the removal of some text at the very end of the text file which I need to retain.
The line added to my process file which strips the blocks of text is below:
$contents = join '', grep { !/Layer\s*=\s*7\b/ } split /^(?=CHARTS)/m, $contents;
The data below shows what is being stripped. Each block of text commences with CHARTS and ends with [28]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
There is then a blank line and we are on to the next block, which again commences with CHARTS.
The line shown at the start of the question correctly strips each entire block (from start to finish) where Layer=7, which is in the 4th line of each block.
The very last block in the file is then followed by some information which formats things. That information commences with STACK. Below the sample code below I show that STACK info.
I have posted a 2 min video which describes the issue in detail
CHARTS
Position=574,1988,1013,2652,-1,-1
Color=14671839
Layer=7
[0] Font=MS SAN SERIF,10,0,F,F,
[1] Show=F,F,F,T,T,F,T,F,F,T,
[2] Scale=F,F,T,F,F,F,F,F,0,T,F,
[3] Grid=F,F,F,F,1,
[4] Paint=F,F,F,0,0,0,
[5] Bars=1,2000,1970,
[6] Colors=65793,0,0,8388608,32767,65793,0,0,
[7] Theme=6,0,255,65280,7566080,0,16777215,0,
[8] Candles=F,F,F,F,1,F,
[9] Filter=T,F,F,F,F,0,0
[10] Type=F,F,F,F,15,5083,
[11] Spacing=5,236,0,10,4,-7,73,
[12] Range=227.8,107.2,2.05,0.01
[13] Volume=0,100,0,0,0,0,
[14] Refresh=0,0,0,
[15] Feed=5,5,F,
[16] Template=
[17] Symbol=#OJ#.W
[18] SubSizes=0,0,0,0,0,0,0,0,0,0,
[19]= <<< Andrews Pitchfork 1 >>>
[20]=61,5085,0,1,192,0,0,0,0,0,0,0,0,0,0,0,0,
[21]=16711935,16711935,16711935,255,16711935,255,16711935,16711935,65793,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[22]=2,7,0,0,0,64.58475,226.99976,97.1011,35,2,0,0,25,38.2,50,61.8,75,100,0,0,0,0,0,0,0,0,
[23]=146,0,0,2,1120518,0,1120127,255,1090220,1,3,3,1,1,4,1,1,3,1,1,1,0,0,0,0,
[24]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[25]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[26]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[27]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[28]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[19]= <<< c:\XXXXX\Alerts\AUD.wav 103.47 672.59 >>>
[20]=65,5088,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,
[21]=65280,65280,8421376,0,255,255,16711680,16711680,65280,16744447,32767,0,0,0,0,0,0,0,0,0,0,0,0,0,
[22]=0,0,0,0,2730.6001,103.47184,672.59155,103.47184,5,0,0,0,0,0,0,1,0,0.1,0,0,0,0,0,0,0,0,
[23]=3,0,0,0,1120914,0,1170120,255,1120914,1,5,5,1,0,1,1,1,1,1,1,1,0,0,0,0,
[24]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,99,58,92,69,110,115,105,103,110,49,
[25]=48,92,65,108,101,114,116,115,92,65,85,68,46,119,97,118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[26]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[27]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[28]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[19]= <<< Line t 160.65 729.77 >>>
[20]=65,5089,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[21]=16711935,16711680,8421376,0,255,255,16711680,16711680,65280,16744447,32767,0,0,0,0,0,0,0,0,0,0,0,0,0,
[22]=0,0,0,0,2892.6001,160.65494,729.77466,160.65494,5,0,0,0,0,0,0,1,0,0.1,0,0,0,0,0,0,0,0,
[23]=1,0,0,0,1151023,0,1170120,255,1151023,1,2,2,1,0,1,1,1,1,1,1,1,0,0,0,0,
[24]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[25]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[26]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[27]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[28]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
CHARTS
Position=-462,3460,-23,4124,-1,-1
Color=14671839
Layer=1
[0] Font=MS SAN SERIF,10,0,F,F,
[1] Show=F,F,F,T,T,F,T,F,F,T,
[2] Scale=F,F,T,F,F,F,F,F,0,T,F,
[3] Grid=F,F,F,F,1,
[4] Paint=F,F,F,0,0,0,
[5] Bars=1,2000,1970,
[6] Colors=65793,0,0,8388608,32767,65793,0,0,
[7] Theme=6,0,255,65280,7566080,0,16777215,0,
[8] Candles=F,F,F,F,1,F,
[9] Filter=T,F,F,F,F,0,0
[10] Type=F,F,F,F,15,43286,
[11] Spacing=5,183,0,10,4,-7,73,
[12] Range=148.5,89.1,0.01,0.01
[13] Volume=0,100,0,0,0,0,
[14] Refresh=0,0,0,
[15] Feed=5,2,F,
[16] Template=
[17] Symbol=SVXY.D
[18] SubSizes=0,0,0,0,0,0,0,0,0,0,
[19]= <<< Circle >>>
[20]=62,43296,0,0,576,0,0,0,0,0,0,0,0,0,0,0,0,
[21]=13959167,16711680,65280,255,255,5242880,16744192,12900,255,5242880,16727871,0,0,0,0,0,0,0,0,0,0,0,0,0,
[22]=2,7,0,0,-0.28571,134.64,135.71358,134.62071,15,0,0,0,25,38.2,50,61.8,75,100,150,161.8,200,0,0,0,0,0,
[23]=130,2,0,2,1170222,1,1170222,1,1170215,0,2,0,1,1,1,1,1,3,1,1,1,0,0,0,0,
[24]=176,0,0,0,0,0,0,0,0,0,0,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,250,25,0,117,4,119,0,216,250,25,
[25]=0,64,202,15,5,4,182,73,0,168,233,105,179,2,0,0,0,117,4,119,0,176,120,64,0,64,202,15,5,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[26]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[27]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[28]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[19]= <<< Circle >>>
[20]=62,43297,0,0,576,0,0,0,0,0,0,0,0,0,0,0,0,
[21]=13959167,16711680,65280,255,255,5242880,16744192,12900,255,5242880,16727871,0,0,0,0,0,0,0,0,0,0,0,0,0,
[22]=2,7,1.85714,-0.14286,1.57143,145.22144,146.31429,145.22144,15,0,0,0,25,38.2,50,61.8,75,100,150,161.8,200,0,0,0,0,0,
[23]=130,2,0,2,1170323,1,1170323,1,1170321,0,2,0,1,1,1,1,1,3,1,1,1,0,0,0,0,
[24]=176,0,0,0,0,0,0,0,0,0,0,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,250,25,0,117,4,119,0,216,250,25,
[25]=0,64,202,15,5,4,182,73,0,168,233,105,179,2,0,0,0,117,4,119,0,176,120,64,0,64,202,15,5,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[26]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[27]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[28]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[19]= <<< Circle >>>
[20]=62,44362,0,0,576,0,0,0,0,0,0,0,0,0,0,0,0,
[21]=13959167,16711680,65280,255,255,5242880,16744192,12900,255,5242880,16727871,0,0,0,0,0,0,0,0,0,0,0,0,0,
[22]=2,7,0.09091,0,0.09091,63.96,63.93712,63.93712,15,0,0,0,25,38.2,50,61.8,75,100,150,161.8,200,0,0,0,0,0,
[23]=130,2,0,2,1161108,1,1161108,1,1161104,0,2,0,1,1,1,1,1,3,1,1,1,0,0,0,0,
[24]=176,0,0,0,0,0,0,0,0,0,0,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,250,25,0,123,2,159,3,216,250,25,
[25]=0,64,202,15,5,4,182,73,0,168,233,105,179,2,0,0,0,123,2,159,3,176,120,64,0,64,202,15,5,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[26]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[27]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[28]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
So, here below is the problem area. The first two lines below are the final two lines of the last block of CHARTS data in the file. As you can see, it is then followed by many smaller blocks which commence with STACK.
This question is simply looking for a modification to the line of code at the start of the question, replicated once more below, to not strip out the STACK blocks. Using the current solution it does remove all the Layer=7 blocks but it also removes all of the STACK blocks at the end of the file. This is despite the final block of text prior to the STACK blocks being Layer=1, not Layer=7.
$contents = join '', grep { !/Layer\s*=\s*7\b/ } split /^(?=CHARTS)/m, $contents;
[27]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[28]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
STACK
Position=399,390,888,1211,0,1048
Color=-16777201
Layer=6
ID=56729,56730,56731,56732,56733,56734,56735,
[1] Name=
[2] Index=1,
[3] Pinned=F,
[4] Font=8,-16777208,F,MS SANS SERIF
Window=Minimized
STACK
Position=399,684,888,1348,0,1048
Color=-16777201
Layer=1
ID=28487,9939,
[1] Name=
[2] Index=0,
[3] Pinned=F,
[4] Font=8,-16777208,F,MS SANS SERIF
Window=Minimized
STACK
Provided STACK blocks does only occur at the end of the file, you can try to also split out the STACK blocks:
$contents = join '', grep { /^STACK/ || !/Layer\s*=\s*7\b/ } split /^(?=CHARTS|STACK)/m, $contents;

iPython prompt confusion

I am having trouble getting the prompt to show the current working directory in iPython 0.13.1 running in windows. As you can see below, after changing the current working directory to 'C:\Users\Lou\Documents\Lou's Software\projects\loutilities', the \Y3 only shows 'C:/Users/Lou'. The same behavior is seen with \w and {cwd} configurations.
I'm sure this is something dumb I'm doing, but I haven't been able to figure it out, or find anything through Google or Stack Overflow.
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 0.13.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
[IPKernelApp] To connect another client to this kernel, use:
[IPKernelApp] --existing kernel-9572.json
C:/Users/Lou> cd "C:\Users\Lou\Documents\Lou's Software\projects\loutilities"
C:\Users\Lou\Documents\Lou's Software\projects\loutilities
C:/Users/Lou> config PromptManager
PromptManager options
-------------------
PromptManager.color_scheme=<Unicode>
Current: u'Linux'
PromptManager.in2_template=<Unicode>
Current: u' .\\D.: '
Continuation prompt.
PromptManager.in_template=<Unicode>
Current: u'\\Y3> '
Input prompt. '\#' will be transformed to the prompt number
PromptManager.justify=<Bool>
Current: False
If True (default), each prompt will be right-aligned with the preceding one.
PromptManager.out_template=<Unicode>
Current: u'Out[\\#]: '
Output prompt. '\#' will be transformed to the prompt number
Thomas asked for output of os.getcwdu(). I used config command to change the prompt (I'd gone back to In [#n] prompt), and In [#n] prompt remained. A clue?
In [1]: config PromptManager.in_template='\\Y3'
In [3]: config PromptManager
PromptManager options
-------------------
PromptManager.color_scheme=<Unicode>
Current: u'Linux'
PromptManager.in2_template=<Unicode>
Current: u' .\\D.: '
Continuation prompt.
PromptManager.in_template=<Unicode>
Current: u'\\Y3'
Input prompt. '\#' will be transformed to the prompt number
PromptManager.justify=<Bool>
Current: True
If True (default), each prompt will be right-aligned with the preceding one.
PromptManager.out_template=<Unicode>
Current: u'Out[\\#]: '
Output prompt. '\#' will be transformed to the prompt number
In [4]: import os
In [5]: os.getcwdu()
Out[5]: u'C:\\Users\\Lou'
In [6]: cd weather
(bookmark:weather) -> C:\Users\Lou\Documents\Lou's Software\projects\weather
C:\Users\Lou\Documents\Lou's Software\projects\weather
In [7]: os.getcwdu()
Out[7]: u"C:\\Users\\Lou\\Documents\\Lou's Software\\projects\\weather"
And the original test duplicated...
C:/Users/Lou> cd weather
(bookmark:weather) -> C:\Users\Lou\Documents\Lou's Software\projects\weather
C:\Users\Lou\Documents\Lou's Software\projects\weather
C:/Users/Lou> import os
C:/Users/Lou> os.getcwdu()
Out[3]: u"C:\\Users\\Lou\\Documents\\Lou's Software\\projects\\weather"
C:/Users/Lou> config PromptManager
PromptManager options
-------------------
PromptManager.color_scheme=<Unicode>
Current: u'Linux'
PromptManager.in2_template=<Unicode>
Current: u' .\\D.: '
Continuation prompt.
PromptManager.in_template=<Unicode>
Current: u'\\Y3> '
Input prompt. '\#' will be transformed to the prompt number
PromptManager.justify=<Bool>
Current: True
If True (default), each prompt will be right-aligned with the preceding one.
PromptManager.out_template=<Unicode>
Current: u'Out[\\#]: '
Output prompt. '\#' will be transformed to the prompt number
11/21/12 - check get_ipython().prompt_manager.templates:
C:/Users/Lou> pwd
Out[1]: u'C:\\Users\\Lou'
C:/Users/Lou> get_ipython().prompt_manager.templates
Out[2]:
{'in': u'{cwd_y[3]}> ',
'in2': u' .{dots}.: ',
'out': u'Out[{color.number}{count}{color.prompt}]: '}
C:/Users/Lou> cd weather
(bookmark:weather) -> C:\Users\Lou\Documents\Lou's Software\projects\weather
C:\Users\Lou\Documents\Lou's Software\projects\weather
C:/Users/Lou> pwd
Out[4]: u"C:\\Users\\Lou\\Documents\\Lou's Software\\projects\\weather"
C:/Users/Lou> get_ipython().prompt_manager.templates
Out[5]:
{'in': u'{cwd_y[3]}> ',
'in2': u' .{dots}.: ',
'out': u'Out[{color.number}{count}{color.prompt}]: '}