From 294f9dd538cdf33c1345841fecbf9b8a8cc47ec0 Mon Sep 17 00:00:00 2001
From: Gaspard Goupy <gaspard.goupy@univ-lille.fr>
Date: Fri, 28 Mar 2025 18:29:57 +0100
Subject: [PATCH] Edit dataset.py

---
 spikenn/dataset.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/spikenn/dataset.py b/spikenn/dataset.py
index 1cb0d3d..0bbb9e3 100644
--- a/spikenn/dataset.py
+++ b/spikenn/dataset.py
@@ -2,7 +2,7 @@ import numpy as np
 
 
 # To represent a list of spikes (sparse representation)
-DATA_TYPE = [('indices', np.int16), ('timestamps', np.float32)]
+DATA_TYPE = [('indices', np.int32), ('timestamps', np.float32)]
 
 
 # Iterator for SpikingDataset class
@@ -70,7 +70,7 @@ class SpikingDataset:
             dataset.data.append(sample)
 
         # Map numpy labels to numpy array of integers ranging from 0 to N
-        numpy_labels = np.searchsorted(np.unique(numpy_labels), numpy_labels).astype(np.int16)
+        numpy_labels = np.searchsorted(np.unique(numpy_labels), numpy_labels).astype(np.int32)
         dataset.labels = numpy_labels
         
         dataset.max_time = max_time
-- 
GitLab