@@ -711,7 +711,7 @@ def rquant(shape, unit, incr=False):
711711
712712 @classmethod
713713 def create_all_annotated (cls ):
714- times = cls .rquant (10 , pq .s )
714+ times = cls .rquant (10 , pq .s , incr = True )
715715 times_ann = {cls .rword (6 ): cls .rquant (10 , pq .ms )}
716716 signal = cls .rquant ((10 , 10 ), pq .V )
717717 signal_ann = {cls .rword (6 ): cls .rquant (10 , pq .uV )}
@@ -744,8 +744,8 @@ def create_all_annotated(cls):
744744 event .annotate (** cls .rdict (4 ))
745745 seg .events .append (event )
746746
747- spiketrain = SpikeTrain (times = times , t_stop = pq . s , units = pq .s ,
748- array_annotations = times_ann )
747+ spiketrain = SpikeTrain (times = times , t_stop = 10 * pq .s ,
748+ units = pq . s , array_annotations = times_ann )
749749 d = cls .rdict (6 )
750750 d ["quantity" ] = pq .Quantity (10 , "mV" )
751751 d ["qarray" ] = pq .Quantity (range (10 ), "mA" )
@@ -859,7 +859,7 @@ def test_signals_write(self):
859859 anotherblock .segments .append (seg )
860860 irsig = IrregularlySampledSignal (
861861 signal = np .random .random ((20 , 30 )),
862- times = self .rquant (20 , pq .ms , True ),
862+ times = self .rquant (20 , pq .ms , incr = True ),
863863 units = pq .A
864864 )
865865 seg .irregularlysampledsignals .append (irsig )
@@ -875,7 +875,7 @@ def test_signals_write(self):
875875 self .write_and_compare ([block , anotherblock ])
876876
877877 block .segments [0 ].irregularlysampledsignals .append (
878- IrregularlySampledSignal (times = np .random .random (10 ),
878+ IrregularlySampledSignal (times = np .sort ( np . random .random (10 ) ),
879879 signal = np .random .random ((10 , 13 )),
880880 units = "mV" , time_units = "s" ,
881881 dtype = np .float ,
0 commit comments