Skip to content

Commit

Permalink
Merge branch 'master' into sonata
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Mar 28, 2019
2 parents a36629c + c67dd0c commit 6d1e062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyNN/common/populations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ def __getitem__(self, index):
pindex = boundaries[1:].searchsorted(index, side='right')
return self.populations[pindex][index - boundaries[pindex]]
elif isinstance(index, (slice, tuple, list, numpy.ndarray)):
if isinstance(index, slice) or index.dtype == bool:
if isinstance(index, slice) or (hasattr(index, "dtype") and index.dtype == bool):
indices = numpy.arange(self.size)[index]
else:
indices = numpy.array(index)
Expand Down

0 comments on commit 6d1e062

Please sign in to comment.