From dc4e96dffd323f696891d0308e02865386a8a634 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Al=C3=A1n=20Mu=C3=B1oz?= <alan.munoz@ed.ac.uk>
Date: Mon, 6 Mar 2023 12:31:04 +0000
Subject: [PATCH] fix(extractor): enforce ndarray for bg masks

---
 src/extraction/core/extractor.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/extraction/core/extractor.py b/src/extraction/core/extractor.py
index 4fc5e484..3f7fdbef 100644
--- a/src/extraction/core/extractor.py
+++ b/src/extraction/core/extractor.py
@@ -482,7 +482,7 @@ class Extractor(StepABC):
         # stored as an array arranged as (traps, channels, time points, X, Y, Z)
         tiles = self.get_tiles(tp, tile_shape=tile_size, channels=tree_chs)
         # generate boolean masks for background as a list with one mask per trap
-        bgs = []
+        bgs = np.array([])
         if self.params.sub_bg:
             # bgs = [
             #     ~np.sum(m, axis=0).astype(bool)
-- 
GitLab