def interspike_time(spike_array):
    """Determine number of timesteps between all consecutive spikes.
    
    :param spike_array: 1 dimensional spike array

    :return: array with the time between all consecutive spikes. 
    """
    spike_indices = (spike_array > 0).nonzero()
    interspike_times = []
    for idx in range(len(spike_indices) - 1):
        inter_time = spike_indices[idx + 1] - spike_indices[idx]
        interspike_times.append(inter_time)
    return interspike_times
