From 2dc129e947c7ddd73e29f58ee50a37006826a19d Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Fri, 22 Apr 2022 14:10:34 -0400 Subject: [PATCH] CLN Remove unneeded code --- sklearn/inspection/_plot/decision_boundary.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sklearn/inspection/_plot/decision_boundary.py b/sklearn/inspection/_plot/decision_boundary.py index 78a8b16bd577a..21f37f3e28f98 100644 --- a/sklearn/inspection/_plot/decision_boundary.py +++ b/sklearn/inspection/_plot/decision_boundary.py @@ -311,14 +311,10 @@ def from_estimator( # TODO: Support pos_label response = response[:, 1] - if xlabel is not None: - xlabel = xlabel - else: + if xlabel is None: xlabel = X.columns[0] if hasattr(X, "columns") else "" - if ylabel is not None: - ylabel = ylabel - else: + if ylabel is None: ylabel = X.columns[1] if hasattr(X, "columns") else "" display = DecisionBoundaryDisplay(