From 8d03c0d9842dd9fcb0fac48074eb847057ab8efe Mon Sep 17 00:00:00 2001 From: Kaushik Bokka Date: Sat, 13 Feb 2021 12:48:26 +0530 Subject: [PATCH] minor enhancements --- flash/tabular/classification/data/data.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/flash/tabular/classification/data/data.py b/flash/tabular/classification/data/data.py index 2a22af307f..8d9977af22 100644 --- a/flash/tabular/classification/data/data.py +++ b/flash/tabular/classification/data/data.py @@ -85,11 +85,8 @@ def __init__( if categorical_input is None and numerical_input is None: raise RuntimeError('Both `categorical_input` and `numerical_input` are None!') - if categorical_input is None: - categorical_input = [] - - if numerical_input is None: - numerical_input = [] + categorical_input = categorical_input if categorical_input is not None else [] + numerical_input = numerical_input if numerical_input is not None else [] if valid_df is not None: dfs.append(valid_df)