made modify spiketrains work with empty arrays