From 62893567aaab33c68cdea21033a75a8664bf148b Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Fri, 28 Feb 2020 17:57:08 +0100 Subject: [PATCH] Lint --- src/pystencils_autodiff/backends/_torch_native.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pystencils_autodiff/backends/_torch_native.py b/src/pystencils_autodiff/backends/_torch_native.py index bba20bc..c9c78dd 100644 --- a/src/pystencils_autodiff/backends/_torch_native.py +++ b/src/pystencils_autodiff/backends/_torch_native.py @@ -64,7 +64,7 @@ def create_autograd_function(autodiff_obj, use_cuda): field.shape, dtype=numpy_dtype_to_torch(field.dtype.numpy_dtype), device=next(chain(args, kwargs.values())).device) - except: + except Exception: shape = next(filter(lambda x: isinstance(x, torch.Tensor), chain(args, kwargs.values()))).shape kwargs[field.name] = torch.zeros( shape, -- GitLab