-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base.summarysize not properly accounting for Vectors containing certain types #40773
Comments
Great catch, you're right --- |
To help others who might search for |
As a quickfix, I copied this function replacing "SimpleVector" with "Vector" so it will have a specialization for Vectors also. It helps. function (ss::SummarySize)(obj::SimpleVector)
key = pointer_from_objref(obj)
haskey(ss.seen, key) ? (return 0) : (ss.seen[key] = true)
size::Int = Core.sizeof(obj)
if !isempty(obj)
push!(ss.frontier_x, obj)
push!(ss.frontier_i, 1)
end
return size
end |
Hey all. On Julia 1.5.3:
it seems that
Base.summarysize
doesn't recurse deeply enough forVector
s containingSet
s (as well as for our own user-defined type).Array{Array{Int64}}
,Array{Dict{Int64,Int64}}
, and a few other permutations seem to work fine.I dug a little bit and I think this has something to do with it and is preventing the function from accessing the set:
which is defined here
julia/base/array.jl
Line 157 in e4f79b7
The text was updated successfully, but these errors were encountered: