From 1fdab645cff7ccc554421baab3bbdec012e12093 Mon Sep 17 00:00:00 2001 From: Andreas Schuh Date: Mon, 30 Oct 2023 12:35:46 +0000 Subject: [PATCH] [core] Gaussian kernel tensor ndim must be 1 even when radius=0 --- src/deepali/core/kernels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/deepali/core/kernels.py b/src/deepali/core/kernels.py index 0db123f..57857ff 100644 --- a/src/deepali/core/kernels.py +++ b/src/deepali/core/kernels.py @@ -282,7 +282,7 @@ def gaussian1d( else: if scale is None: scale = 1 - kernel = as_tensor(scale, dtype=dtype, device=device) + kernel = as_tensor([scale], dtype=dtype, device=device) return kernel