Skip to content

Commit

Permalink
fix warning dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
tmigot committed Feb 21, 2021
1 parent a0a2924 commit 2c85236
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/State/ListOfStates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function print(list :: AbstractListStates;
for k in fieldnames(typeof(list.list[1,1]))
tab = vcat(tab, [getfield(i[1], k) for i in list.list]');
end
df = DataFrame(tab)
df = DataFrame(tab, :auto)

if isnothing(print_sym)
verbose && print(df)
Expand Down
12 changes: 6 additions & 6 deletions src/Stopping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ function show(io :: IO, stp :: VoidStopping)
end
function show(io :: IO, stp :: AbstractStopping)
println(io, typeof(stp))
print(io, stp.meta)
print(io, stp.stop_remote)
print(io, stp.current_state)
#print(io, stp.meta) #we can always print stp.meta
#print(io, stp.stop_remote) #we can always print stp.stop_remote
#print(io, stp.current_state) #we can always print stp.current_state
if !(typeof(stp.main_stp) <: VoidStopping)
println(io, "It has a main_stp $(typeof(stp.main_stp))")
else
Expand All @@ -173,15 +173,15 @@ function show(io :: IO, stp :: AbstractStopping)
catch
print("Problem is $(typeof(stp.pb)).")
end
if stp.stopping_user_struct != nothing
if !isnothing(stp.stopping_user_struct)
try
print("The user-defined structure is ")
show(io, stp.stopping_user_struct)
catch
print("The user-defined structure is of type $(typeof(stp.stopping_user_struct)).")
print("The user-defined structure is of type $(typeof(stp.stopping_user_struct)).\n")
end
else
print(io, "No user-defined structure is furnished.")
print(io, "No user-defined structure is furnished.\n")
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/Stopping/StoppingMetamod.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,4 +295,4 @@ function show(io :: IO, meta :: AbstractStoppingMeta)
varlines=string(varlines, "There is no user defined structure in the meta.\n")
end
println(io, varlines)
end
end

0 comments on commit 2c85236

Please sign in to comment.