Skip to content

Commit

Permalink
Merge bd52ad0 into ffe16e8
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg authored Jun 14, 2022
2 parents ffe16e8 + bd52ad0 commit 725b884
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions brian2/core/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,9 +1097,11 @@ def get_with_index_array(self, item):
len(item) == 2 and
isinstance(item[0], slice) and
item[0] == slice(None) and
item[1] is None and
self.index_var == '_idx'):
return variable.get_value()[item]
item[1] is None):
if self.index_var == '_idx':
return variable.get_value()[item]
else:
return variable.get_value()[self.index_var.get_value()][item]
else:
indices = self.indexing(item, self.index_var)

Expand Down

0 comments on commit 725b884

Please sign in to comment.