Changeset 192 for trunk/src/stgen.py

Show
Ignore:
Timestamp:
08/21/08 16:17:28 (4 years ago)
Author:
apdavison
Message:

Last commit introduced a bug in stgen

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/stgen.py

    r191 r192  
    9191        if len(ps) > 0: 
    9292            # gen uniform rand on 0,1 for each spike 
    93             rn = array(self.rng.uniform(0, 1, len(ps))) 
     93            try: 
     94                rn = array(self.rng.uniform(0, 1, len(ps))) # numpy 
     95            except TypeError: # 
     96                rn = array(self.rng.uniform(len(ps))) # gsl 
    9497 
    9598            # instantaneous rate for each spike