From 6bcdb840a61029a744332f305b0204b1e8aaba77 Mon Sep 17 00:00:00 2001 From: Michael Denker Date: Tue, 18 May 2021 22:26:28 +0200 Subject: [PATCH] Fix proposed by #420. --- elephant/current_source_density_src/icsd.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/elephant/current_source_density_src/icsd.py b/elephant/current_source_density_src/icsd.py index ab81ced46..6322eee2f 100644 --- a/elephant/current_source_density_src/icsd.py +++ b/elephant/current_source_density_src/icsd.py @@ -187,12 +187,13 @@ def __init__(self, lfp, coord_electrode, **kwargs): if self.vaknin_el: # extend lfps array by duplicating potential at endpoint contacts if lfp.ndim == 1: - self.lfp = np.empty((lfp.shape[0] + 2, )) * lfp.units + self.lfp = np.empty((lfp.shape[0] + 2,)) else: - self.lfp = np.empty((lfp.shape[0] + 2, lfp.shape[1])) * lfp.units - self.lfp[0, ] = lfp[0, ] + self.lfp = np.empty((lfp.shape[0] + 2, lfp.shape[1])) + self.lfp[0,] = lfp[0,] self.lfp[1:-1, ] = lfp - self.lfp[-1, ] = lfp[-1, ] + self.lfp[-1,] = lfp[-1,] + self.lfp = self.lfp * lfp.units else: self.lfp = lfp