Skip to content

Commit

Permalink
slim down comments; tweak final test for reshape/setdims fix (bug 403)
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig DeForest authored and Craig DeForest committed Nov 13, 2015
1 parent 6cb8029 commit eba0d9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Basic/Core/Core.xs
Expand Up @@ -1210,7 +1210,7 @@ setdims(x,dims_arg)
CODE:
{
/* This mask avoids all kinds of subtle dereferencing bugs (CED 11/2015) */
if(x->trans || x->vafftrans || x->children.next){
if(x->trans || x->vafftrans || x->children.next ) {
pdl_barf("Can't setdims on a PDL that already has children");
}

Expand Down
7 changes: 2 additions & 5 deletions t/core.t
Expand Up @@ -13,7 +13,7 @@ BEGIN {
eval {
require PDL::LiteF;
} or BAIL_OUT("PDL::LiteF failed: $@");
plan tests => 67;
plan tests => 66;
PDL::LiteF->import;
}
$| = 1;
Expand Down Expand Up @@ -242,9 +242,6 @@ ok( ( $a->ndims==2 and $a->dim(0)==2 and $a->dim(1)==2 ), "reshape did the right
ok(all($a == short pdl([[3,4],[5,6]])), "reshape moved the elements to the right place");

$b = $a->slice(":,:");
eval { $a->reshape(4); };
ok( $@ =~ m/Can\'t/, "reshape fails on a PDL with a child" );

eval { $b->reshape(4); };
ok($@ =~ m/Can\'t/, "reshape fails on a PDL with a parent" );
ok( $@ =~ m/Can\'t/, "reshape fails on a PDL with a parent" );

0 comments on commit eba0d9a

Please sign in to comment.