Changeset 438 for trunk/src/stgen.py

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

Files:
1 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