Changeset 717

Show
Ignore:
Timestamp:
03/01/10 22:26:32 (2 years ago)
Author:
apdavison
Message:

Partial fix for ticket:160, as well as fixing some related limitations in the nest module.

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/hoc/vecstim.mod

    r216 r717  
    6161 
    6262PARAMETER { 
    63     ping = 0 (ms)  
     63    ping = 1 (ms)  
    6464} 
    6565 
     
    7777    } 
    7878    if (ping > 0) { 
    79         net_send(ping+1e-9, 2) 
     79        net_send(ping, 2) 
    8080    } 
    8181} 
  • trunk/src/nest/__init__.py

    r713 r717  
    216216            if isinstance(val, (str, float, int)): 
    217217                param_dict = {param: float(val)} 
     218            elif isinstance(val, (list, numpy.ndarray)): 
     219                param_dict = {param: [val]*len(self)} 
    218220            else: 
    219221                raise errors.InvalidParameterValueError 
     
    241243                    if isinstance(value, int) and isinstance(self.celltype.default_parameters[key], float): 
    242244                        value = float(value) 
     245                    elif (isinstance(value, numpy.ndarray) and len(value.shape) == 1) and isinstance(self.celltype.default_parameters[key], list): 
     246                        pass 
    243247                    else: 
    244248                        raise errors.InvalidParameterValueError("The parameter %s should be a %s, you supplied a %s" % (key,