Skip to content

Commit

Permalink
simplified outputDict.items()
Browse files Browse the repository at this point in the history
  • Loading branch information
1b15 committed Mar 1, 2024
1 parent 69c5c30 commit c75b875
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions neurolib/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,11 +593,9 @@ def xr(self, group=""):
assert len(timeDictKey) > 0, f"No time array found (starting with t) in output group {group}."
t = outputDict[timeDictKey].copy()
del outputDict[timeDictKey]
outputs = []
outputNames = []
for key, value in outputDict.items():
outputNames.append(key)
outputs.append(value)

outputNames, outputs = zip(*outputDict.items())
outputNames = list(outputNames)

nNodes = outputs[0].shape[0]
nodes = list(range(nNodes))
Expand Down

0 comments on commit c75b875

Please sign in to comment.