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
40
40
# data files
41
41
* .h5
42
42
* .mat
43
+ ! DoublePendulum.mat
43
44
44
45
# temp files
45
46
~ *
Original file line number Diff line number Diff line change @@ -130,9 +130,9 @@ def _load_mat(filename):
130
130
pass
131
131
132
132
if d == 1 :
133
- data = cons [c , 0 ]
133
+ data = cons [c , 0 ] * s
134
134
else :
135
- data = traj [c , :]
135
+ data = traj [c , :] * s
136
136
137
137
if 'type' in info :
138
138
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):
298
298
self .assertEqual (ds .data .dtype , np .int32 )
299
299
self .assertEqual (ds .data , 1 )
300
300
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
+
301
307
@skipIf (platform .system () != 'Windows' , "Test requires display" )
302
308
def test_interp_1d_example (self ):
303
309
runpy .run_module ('sdf.examples.interp_1d' )
You can’t perform that action at this time.
0 commit comments