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
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.3.0 (2019-11-26)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using JLD2
julia> A = Any[x->x]
1-element Array{var"#7#8",1}:
var"#7#8"()
julia> @save "A.jld2" A
julia> exit()
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.3.0 (2019-11-26)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using JLD2
julia> @load "A.jld2" A
┌ Warning: type Main.#9#10 does not exist in workspace; reconstructing
└ @ JLD2 ~/.julia/dev/JLD2/src/data.jl:1066
1-element Array{Symbol,1}:
:A
I understand that it will never be practical to save anonymous functions in a HDF file. However, it would be helpful if @save raised a warning when you tried to do that.
Among other things, it would save users from repeatedly raising this issue.
I ran across this when I tried to save a DifferentialEquations.ODESolution. That is the kind of thing you want to save, and it would be nice to get a warning when the ODESolution for dx/dt = f(t,x) includes f as an anonymous function. Unless you read the source of DifferentialEquations, there is no reason you would guess that it did.
I ran across this when I tried to save a DifferentialEquations.ODESolution. That is the kind of thing you want to save, and it would be nice to get a warning when the ODESolution for dx/dt = f(t,x) includes f as an anonymous function. Unless you read the source of DifferentialEquations, there is no reason you would guess that it did.
Hmm, that explains my problem. However, a warning that I'm saving an anonymous function is not really a solution to the problem that we'd still want (need!) to save a DifferentialEquations.ODESolution.
Do I understand correctly, that this issue will be fixed with #316
Consider the following.
I understand that it will never be practical to save anonymous functions in a HDF file. However, it would be helpful if
@save
raised a warning when you tried to do that.Among other things, it would save users from repeatedly raising this issue.
I ran across this when I tried to save a
DifferentialEquations.ODESolution
. That is the kind of thing you want to save, and it would be nice to get a warning when theODESolution
fordx/dt = f(t,x)
includesf
as an anonymous function. Unless you read the source ofDifferentialEquations
, there is no reason you would guess that it did.Related issues: #13 #86
The text was updated successfully, but these errors were encountered: