Skip to content

Commit c5886a7

Browse files
committed
add fallback for traits acting on instances
1 parent 54669e3 commit c5886a7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/algorithm_traits.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,3 +649,13 @@ predict_output_scitype(algorithm) =
649649
predict_output_type(algorithm) =
650650
Dict(T => predict_output_type(algorithm, T())
651651
for T in CONCRETE_TARGET_PROXY_TYPES)
652+
653+
654+
# # FALLBACK FOR INSTANCES
655+
656+
for trait in TRAITS
657+
ex = quote
658+
$trait(x) = $trait(typeof(x))
659+
end
660+
eval(ex)
661+
end

0 commit comments

Comments
 (0)