code: def computeISI(spikeTrains):
    
    zeroCount = 0
    isi = []
    cells = 0
    for i in range(np.shape(spikeTrains)[0]):
      if cells > 0 and cells % 250 == 0:
        print str(cells) + " cells processed"
      for j in range(np.shape(spikeTrains)[1]):
        if spikeTrains[i][j] == 0:
          zeroCount += 1
        elif zeroCount > 0:
          isi.append(zeroCount)
          zeroCount = 0
      zeroCount = 0
      cells += 1
    print "**All cells processed**"
    return isi
docs: Estimates the inter-spike interval from a spike train matrix.
    
    @param spikeTrains (array) matrix of spike trains
    @return isi (array) matrix with the inter-spike interval obtained from the spike train.
            Each entry in this matrix represents the number of time-steps in-between 2 spikes
            as the algorithm scans the spike train matrix.