Skip to content

Commit 78f9711

Browse files
fix _subtype_info
1 parent ef6adee commit 78f9711

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • src/frontend/specification

src/frontend/specification/Sem.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,16 +608,17 @@ end
608608
# pretty printing
609609
##############################################################
610610

611-
_subtype_info(::Sem) = ""
612-
_subtype_info(::SemFiniteDiff) = " : Finite Difference Approximation"
611+
_subtype_info(::Sem) = nothing
612+
_subtype_info(::SemFiniteDiff) = "Finite Difference Approximation"
613613

614614
function Base.show(io::IO, sem::AbstractSem)
615615
# if not specified, use compact printing for larger models
616616
if !haskey(io, :compact) && length(loss_terms(sem)) >= 5
617617
io = IOContext(io, :compact => true)
618618
end
619619
print(io, "Structural Equation Model")
620-
print(io, _subtype_info(sem))
620+
si = _subtype_info(sem)
621+
isnothing(si) || print(io, " : "*si)
621622
print("\n")
622623
print(io, "- Loss Functions \n")
623624
for term in loss_terms(sem)

0 commit comments

Comments
 (0)