primitive.t (PDL-2.077) | : | primitive.t (PDL-2.078) | ||
---|---|---|---|---|
skipping to change at line 224 | skipping to change at line 224 | |||
#Test intersect again | #Test intersect again | |||
my $intersect_test=intersect(pdl(1,-5,4,0), pdl(0,3,-5,2)); | my $intersect_test=intersect(pdl(1,-5,4,0), pdl(0,3,-5,2)); | |||
ok (all($intersect_test==pdl(-5,0)), 'Intersect test values'); | ok (all($intersect_test==pdl(-5,0)), 'Intersect test values'); | |||
############################## | ############################## | |||
# Test uniqind | # Test uniqind | |||
$x = pdl([0,1,2,2,0,1]); | $x = pdl([0,1,2,2,0,1]); | |||
$y = $x->uniqind; | $y = $x->uniqind; | |||
eval { $c = all($y==pdl([0,1,3])) }; | eval { $c = all($y==pdl([0,1,3])) }; | |||
is $@, ''; | is $@, ''; | |||
ok $c, "uniqind"; | ok $c, "uniqind" or diag "got: $y"; | |||
is $y->ndims, 1, "uniqind"; | is $y->ndims, 1, "uniqind"; | |||
$y = pdl(1,1,1,1,1)->uniqind; # SF bug 3076570 | $y = pdl(1,1,1,1,1)->uniqind; # SF bug 3076570 | |||
ok(! $y->isempty); | ok(! $y->isempty); | |||
eval { $c = all($y==pdl([0])) }; | eval { $c = all($y==pdl([0])) }; | |||
is $@, ''; | is $@, ''; | |||
ok $c, "uniqind"; | ok $c, "uniqind"; | |||
is $y->ndims, 1, "uniqind, SF bug 3076570"; | is $y->ndims, 1, "uniqind, SF bug 3076570"; | |||
############################## | ############################## | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |