diff --git a/brainpy/_src/dynsys.py b/brainpy/_src/dynsys.py index a6fcc16a..c20fc414 100644 --- a/brainpy/_src/dynsys.py +++ b/brainpy/_src/dynsys.py @@ -806,7 +806,7 @@ def __init__( else: # should be a list/tuple/array of int # do not check again - if not isinstance(idx, collections.Iterable): + if not isinstance(idx, collections.abc.Iterable): raise TypeError('Should be an iterable object of int.') size.append(len(idx)) size += list(target.varshape[len(self.index):])