File tree Expand file tree Collapse file tree 4 files changed +9
-2
lines changed
Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ nosetests.xml
4040# data files
4141* .h5
4242* .mat
43+ ! DoublePendulum.mat
4344
4445# temp files
4546~ *
Original file line number Diff line number Diff line change @@ -130,9 +130,9 @@ def _load_mat(filename):
130130 pass
131131
132132 if d == 1 :
133- data = cons [c , 0 ]
133+ data = cons [c , 0 ] * s
134134 else :
135- data = traj [c , :]
135+ data = traj [c , :] * s
136136
137137 if 'type' in info :
138138 if info ['type' ] == 'Integer' or 'Boolean' :
Original file line number Diff line number Diff line change @@ -298,6 +298,12 @@ def test_dsres_load_dataset(self):
298298 self .assertEqual (ds .data .dtype , np .int32 )
299299 self .assertEqual (ds .data , 1 )
300300
301+ def test_dsres_inverted_signals (self ):
302+ path = os .path .dirname (__file__ )
303+ filename = os .path .join (path , 'DoublePendulum.mat' )
304+ rvisobj = sdf .load (filename , '/world/y_label/cylinders[2]/rvisobj[1]' )
305+ self .assertTrue (rvisobj .data < 0 )
306+
301307 @skipIf (platform .system () != 'Windows' , "Test requires display" )
302308 def test_interp_1d_example (self ):
303309 runpy .run_module ('sdf.examples.interp_1d' )
You can’t perform that action at this time.
0 commit comments