Skip to content

Commit 3f29b61

Browse files
authored
Fix package name printing (#517)
1 parent 7a09754 commit 3f29b61

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

DifferentiationInterface/src/utils/printing.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
function package_name(b::AbstractADType)
22
s = string(b)
3+
s = chopprefix(s, "ADTypes.")
4+
s = chopprefix(s, "Auto")
35
k = findfirst('(', s)
46
isnothing(k) && throw(ArgumentError("Cannot parse backend into package"))
5-
return s[5:(k - 1)]
7+
return s[begin:(k - 1)]
68
end
79

810
function package_name(b::SecondOrder)

0 commit comments

Comments
 (0)