Group
Extension

Matches 13

PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/pdl_from_string.t ( view source; MetaCPAN )
 croaking on arbitrary bare-words:
eval {pdl q[1 foobar 2]};
isnt($@, '', 'croaks on arbitrary string input');
eval {pdl q[$a $b $c]};
isnt($@, '', 'croaks with non-interpolated strings');

# Install 
1 l 3] };
isnt($@, '', 'Croaks when invalid character is specified');
like($@, qr/found disallowed character\(s\) 'l'/, 'Gives meaningful explanation of problem');
eval{ pdl q[1 po 3] };
isnt($@, '', 
l{ pdl q[1 +-2 3] };
isnt($@, '', 'Croaks when it finds consecutive signs');
like($@, qr/found a \w+ sign/, 'Gives meaningful explanation of problem');
eval{ pdl q[1 -+2 3] };
isnt($@, '', 'Croaks whe
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/ufunc.t ( view source; MetaCPAN )
dn't segfault!
is $ind_double.'', '[3 0 2 4 1]';

eval { empty()->medover }; # shouldn't segfault
isnt $@, '', 'exception for percentile on empty ndarray';

# set up test arrays
#
my $x = pdl(0,0,6,3,
,5]]);
my $e_sort = $e->qsortvec;

eval { sequence(3, 3)->medover(my $o = null, my $t = null); };
isnt $@, '', 'a [t] Par cannot be passed';

my $med_dim = 1000;
ok tapprox(sequence(10,$med_dim,$med_d
random(15)->qsort(5); };
isnt($@, '', "qsort extra argument");
eval { random(15)->qsorti(5); };
isnt($@, '', "qsorti extra argument");
eval {random(10,4)->qsortvec(5); };
isnt($@, '', "qsortvec extra 
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/core.t ( view source; MetaCPAN )
my $y = zeroes(1,3); $y .= sequence(2,3); };
isnt $@, '', 'scaling-up of output dim 1 throws error';
eval { my $y = zeroes(1); $y .= zeroes(0) + 1; };
isnt $@, '', 'scaling-down of output dim 1 throws
infinite-loop
isnt $@, '', 'is_inplace as class method throws exception';

my $s = sequence(3);
is $s->trans_parent, undef, 'trans_parent without trans undef';
my $slice = $s->slice;
isnt +(my $tp=$sl
f set_donttouchdata should be fine';
eval { $notouch->setdims([3,2]); $notouch->make_physical; };
isnt $@, '', 'setdims/make_physical to different size of set_donttouchdata should fail';

done_testing
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/pgplot.t ( view source; MetaCPAN )
$w->fits_imag(\$x,{J=>1});"});'
) {
    my $result = eval $str;
    is $@, '', "eval '$str'";
    isnt $result, 0, 'returned true';
}

$interactive_ctr++;
SKIP: {
   skip $skip_interactive_msg, 1 unle
                  ."});',
    ) ) {
    my $result = eval $str;
    is $@, '', "eval '$str'";
    isnt $result, 0, 'returned true';
}

$interactive_ctr++;
SKIP: {
   skip $skip_interactive_msg, 1 unle
eractive_ctr), "interactive tests");
}

my $result = eval '$w->close';
is $@, '', "close window";
isnt $result, 0, 'returned true';

my @opts = (Device => $dev, Aspect => 1, WindowWidth => 5);
my $rat
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/proj_transform.t ( view source; MetaCPAN )
 +lon_0=0 +datum=WGS84";
   my $proj = eval { t_proj( proj_params => $eqc_opts ) };
   isnt $proj, undef;
   isnt $proj->proj_params, undef;
   my $eqc = eval { $map->map( $proj, $map_size ) };
   if 
;
   my $proj = eval { no strict 'refs'; $alias->( proj_params => $eqc_opts ) };
   is $@, '';
   isnt $proj, undef;
}

sub get_ref_robin_slices {
    my @slices = ();
    push(@slices, <<"END");

[
 
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/pp_croaking.t ( view source; MetaCPAN )
est1 =>
		Pars => 'a(n)',
		Code => q{
			loop %{
				$a()++;
			%}
		}
	);
};

my $err_msg = $@;
isnt($@, undef, 'loop without dim name should throw an error');
like($@, qr/Expected.*loop.*%\{/, 'loo
f(test1 =>
    Pars => 'a(n)',
    OtherPars => 'int b; int c',
    OtherParsDefaults => { b => 0 },
    Code => q{;},
  );
};
isnt $@, '', 'error to give default for non-last params';

done_testing;
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/lut.t ( view source; MetaCPAN )
re tests => 8;

use PDL::LiteF;
use PDL::Types;
use PDL::Graphics::LUT;

my @names = lut_names();
isnt scalar(@names), 0, "lut_names returns non-empty list";

my @cols = lut_data( $names[0] );
is( sca
2[3])), "reverse lut works");

# check we know about the intensity ramps
my @ramps = lut_ramps();
isnt scalar(@ramps), 0, "lut_ramps returns some ramps";

# load in a different intensity ramp
my @cols
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/func.t ( view source; MetaCPAN )
nterpolation');

# check we trap a call to an unavailable method
eval { $obj->gradient( $xi ); };
isnt( $@ , '' ,'calling unavailable method'); # 5

## Test: Hermite
#
exit unless $slatec;

$x = seque
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/basic.t ( view source; MetaCPAN )
.01,16.9,16.1,15.2,15.4,16.2,15.4,16.2,16.4];
eval { hist ($x,15,15,0.1) }; # shouldn't segfault!
isnt $@, '', 'error thrown';
my ($hx,$h) = hist ($x,15,17,0.1);
ok( tapprox($hx, pdl(qw/15.05   15.15 
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/01-pptest.t ( view source; MetaCPAN )
);
ok( tapprox($vaff,$y) )
  or diag ($vaff, $vaff->dump);

eval { test_foop($x,($y=pdl([1]))) };
isnt $@, '', '[phys] with multi-used mismatched dim of 1 throws exception';

eval { test_foop(pdl([1])
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/math.t ( view source; MetaCPAN )
st inplace
my $pa = pdl(0.5,0.0);
$pa->inplace->bessj0;
eval { $pa->inplace->bessj0(PDL->null) };
isnt $@, '', 'check providing explicit output arg to inplace throws exception';
ok( tapprox($pa,pdl(0.
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/gsl_sf.t ( view source; MetaCPAN )
;
local $SIG{__WARN__} = sub { push @warning, @_ };
my $err_test = eval {gsl_sf_lngamma(pdl(0))};
isnt $@, '', "Got an error for invalid input";
ok @warning > 0, 'Got warnings Ok';
}

($y, my $e) = gs
PDL ( E/ET/ETJ/PDL-2.080.tar.gz, ETJ, 2022; MetaCPAN )
PDL/t/bad.t ( view source; MetaCPAN )
), 'BAD', 'can convert PDL to string' );
is( $x->at, 'BAD', 'at() returns BAD for a bad value' );
isnt( $x->sclr, 'BAD', 'sclr() ignores bad value' );

$x = pdl 4;
$x->badflag(1);
$x->badvalue(4);
is(

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.