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 f948502d9683552f44e1e39e0eec7b9676c776c1..a62b815975ead102e40a465b7323a4b5938667d4 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