From f0e558ead5610c40278e85c0dbc87badea5a829b Mon Sep 17 00:00:00 2001 From: zhhsplendid Date: Sun, 27 Sep 2020 12:50:42 +0000 Subject: [PATCH] Format better code, test=develop --- .../fluid/dygraph/dygraph_to_static/convert_call_func.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/paddle/fluid/dygraph/dygraph_to_static/convert_call_func.py b/python/paddle/fluid/dygraph/dygraph_to_static/convert_call_func.py index f948502d968..a62b815975e 100644 --- a/python/paddle/fluid/dygraph/dygraph_to_static/convert_call_func.py +++ b/python/paddle/fluid/dygraph/dygraph_to_static/convert_call_func.py @@ -69,8 +69,7 @@ def is_unsupported(func): for m in BUILTIN_LIKELY_MODULES: for v in m.__dict__.values(): func_in_dict = func == v - if isinstance(func_in_dict, list) or isinstance(func_in_dict, - numpy.ndarray): + if isinstance(func_in_dict, (list, numpy.ndarray)): func_in_dict = any(func_in_dict) if func_in_dict: func_in_builtin_modules = True -- GitLab