Changeset 438

Show
Ignore:
Timestamp:
10/07/09 00:08:31 (3 years ago)
Author:
emuller
Message:

Fixed stgen problem: inh_gamma_generator array=True returned SpikeTrain if no spikes

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/stgen.py

    r437 r438  
    354354        # return empty if no spikes 
    355355        if len(ps) == 0: 
    356             return SpikeTrain(numpy.array([]), t_start=t[0],t_stop=t_stop) 
     356            if array: 
     357                return numpy.array([]) 
     358            else: 
     359                return SpikeTrain(numpy.array([]), t_start=t[0],t_stop=t_stop) 
    357360 
    358361 
  • trunk/test/test_stgen.py

    r437 r438  
    334334        assert ge.t_stop==1500.0 
    335335 
    336  
     336         
    337337 
    338338