Skip to content

Commit

Permalink
MNT: Initialise with list of list, not of 0s
Browse files Browse the repository at this point in the history
  • Loading branch information
scottclowe committed Jun 13, 2021
1 parent 8514f6b commit 583b4f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fissa/core.py
Expand Up @@ -330,7 +330,7 @@ def _wipe():

print('Doing region growing and data extraction....')
# define inputs
inputs = [0] * self.nTrials
inputs = [[]] * self.nTrials
for trial in range(self.nTrials):
inputs[trial] = [self.images[trial], self.rois[trial],
self.nRegions, self.expansion, self.datahandler]
Expand All @@ -355,7 +355,7 @@ def _wipe():
results = pool.map(extract_func, inputs)

else:
results = [0] * self.nTrials
results = [[]] * self.nTrials
for trial in range(self.nTrials):
results[trial] = extract_func(inputs[trial])

Expand Down Expand Up @@ -495,7 +495,7 @@ def _wipe():
info = np.copy(sep)

# loop over cells to define function inputs
inputs = [0] * int(self.nCell)
inputs = [[]] * int(self.nCell)
for cell in range(self.nCell):
# initiate concatenated data
X = np.concatenate(self.raw[cell], axis=1)
Expand Down Expand Up @@ -528,7 +528,7 @@ def _wipe():
# run separation
results = pool.map(separate_func, inputs)
else:
results = [0] * int(self.nCell)
results = [[]] * int(self.nCell)
for cell in range(self.nCell):
results[cell] = separate_func(inputs[cell])

Expand Down

0 comments on commit 583b4f8

Please sign in to comment.