Skip to content

Commit 866ec36

Browse files
committed
svd tests get got/expected right way round
1 parent a0add20 commit 866ec36

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

t/matrixops.t

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,37 +274,36 @@ my $svd_in = pdl([3,1,2,-1],[-1,3,0,2],[-2,3,0,0],[1,3,-1,2]);
274274
#2x2;
275275
my $this_svd_in = $svd_in->slice("0:1","0:1");
276276
my ($u,$s,$v) = svd($this_svd_in);
277-
is_pdl $this_svd_in, ($u x stretcher($s) x $v->transpose), "svd 2x2";
277+
is_pdl $u x stretcher($s) x $v->transpose, $this_svd_in, "svd 2x2";
278278
}
279279
280280
{
281281
#3x3;
282282
my $this_svd_in = $svd_in->slice("0:2","0:2");
283283
my ($u,$s,$v) = svd($this_svd_in);
284-
is_pdl $this_svd_in, $u x stretcher($s) x $v->transpose, "svd 3x3";
284+
is_pdl $u x stretcher($s) x $v->transpose, $this_svd_in, "svd 3x3";
285285
}
286286
287287
{
288288
#4x4;
289289
my $this_svd_in = $svd_in;
290290
my ($u,$s,$v) = svd($this_svd_in);
291-
is_pdl $this_svd_in,($u x stretcher($s) x $v->transpose),"svd 4x4";
291+
is_pdl $u x stretcher($s) x $v->transpose, $this_svd_in, "svd 4x4";
292292
}
293293
294294
{
295295
#3x2
296296
my $this_svd_in = $svd_in->slice("0:1","0:2");
297297
my ($u,$s,$v) = svd($this_svd_in);
298-
is_pdl $this_svd_in, $u x stretcher($s) x $v->transpose, "svd 3x2";
298+
is_pdl $u x stretcher($s) x $v->transpose, $this_svd_in, "svd 3x2";
299299
}
300300
301301
{
302302
#2x3
303303
my $this_svd_in = $svd_in->slice("0:2","0:1");
304304
my ($u,$s,$v) = svd($this_svd_in->transpose);
305-
is_pdl $this_svd_in, $v x stretcher($s) x $u->transpose, "svd 2x3";
305+
is_pdl $v x stretcher($s) x $u->transpose, $this_svd_in, "svd 2x3";
306306
}
307-
308307
}
309308
310309
{

0 commit comments

Comments
 (0)