Skip to content

Commit c67dd0c

Browse files
author
Andrew Davison
committed
Note to self: run the unit tests before making a commit!!
1 parent 1f98a6d commit c67dd0c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pyNN/common/populations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ def __getitem__(self, index):
11441144
pindex = boundaries[1:].searchsorted(index, side='right')
11451145
return self.populations[pindex][index - boundaries[pindex]]
11461146
elif isinstance(index, (slice, tuple, list, numpy.ndarray)):
1147-
if isinstance(index, slice) or index.dtype == bool:
1147+
if isinstance(index, slice) or (hasattr(index, "dtype") and index.dtype == bool):
11481148
indices = numpy.arange(self.size)[index]
11491149
else:
11501150
indices = numpy.array(index)

0 commit comments

Comments
 (0)