Skip to content

Commit

Permalink
style: clean up indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Dec 23, 2024
1 parent 9ea8c55 commit 1840f53
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/MLJInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,12 @@ function _update(
options,
class,
)
if IDE.handles_class_column(m.expression_type) &&
if (
IDE.handles_class_column(m.expression_type) &&
isnothing(class) &&
MMI.istable(X) &&
:class in MMI.schema(X).names
)
names_without_class = filter(!=(:class), MMI.schema(X).names)
new_X = MMI.selectcols(X, collect(names_without_class))
new_class = MMI.selectcols(X, :class)
Expand Down Expand Up @@ -490,10 +492,12 @@ function _predict(m::M, fitresult, Xnew, idx, class) where {M<:AbstractSRRegress
)
return _predict(m, fitresult, Xnew.data, Xnew.idx, class)
end
if IDE.handles_class_column(m.expression_type) &&
if (
IDE.handles_class_column(m.expression_type) &&
isnothing(class) &&
MMI.istable(Xnew) &&
:class in MMI.schema(Xnew).names
)
names_without_class = filter(!=(:class), MMI.schema(Xnew).names)
Xnew2 = MMI.selectcols(Xnew, collect(names_without_class))
class = MMI.selectcols(Xnew, :class)
Expand Down

0 comments on commit 1840f53

Please sign in to comment.