Changeset 713 for trunk/src/nest/simulator.py
- Timestamp:
- 02/17/10 22:45:18 (2 years ago)
- Files:
-
- 1 modified
-
trunk/src/nest/simulator.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/nest/simulator.py
r711 r713 27 27 28 28 import nest 29 from pyNN import common, random, errors 29 from pyNN import common, random, errors, standardmodels, core 30 30 import logging 31 31 import numpy … … 150 150 nest_model = cellclass 151 151 cell_parameters = cellparams or {} 152 elif isinstance(cellclass, type) and issubclass(cellclass, common.StandardCellType):152 elif isinstance(cellclass, type) and issubclass(cellclass, standardmodels.StandardCellType): 153 153 celltype = cellclass(cellparams) 154 154 nest_model = celltype.nest_name … … 310 310 """ 311 311 # are we sure the targets are all on the current node? 312 if co mmon.is_listlike(source):312 if core.is_listlike(source): 313 313 assert len(source) == 1 314 314 source = source[0] 315 if not co mmon.is_listlike(targets):315 if not core.is_listlike(targets): 316 316 targets = [targets] 317 317 assert len(targets) > 0 … … 351 351 """ 352 352 # are we sure the targets are all on the current node? 353 if co mmon.is_listlike(target):353 if core.is_listlike(target): 354 354 assert len(target) == 1 355 355 target = target[0] 356 if not co mmon.is_listlike(sources):356 if not core.is_listlike(sources): 357 357 sources = [sources] 358 358 assert len(sources) > 0, sources … … 452 452 matrix (as returned by `get(format='array')`). 453 453 """ 454 if not ( common.is_number(value) or common.is_listlike(value)):454 if not (numpy.isscalar(value) or core.is_listlike(value)): 455 455 raise TypeError("Argument should be a numeric type (int, float...), a list, or a numpy array.") 456 456 … … 470 470 value_list.append(val) 471 471 value = value_list 472 if co mmon.is_listlike(value):472 if core.is_listlike(value): 473 473 value = numpy.array(value) 474 474 else:
